title: Jquery: Replace string with values from an array
body: <p>Say I have something like this:</p>
  
  <pre><code>var array = [cat,dog,fish];
  var string = 'The cat and dog ate the fish.';
  </code></pre>
  
  <p>I want to clear all those values from a string</p>
  
  <pre><code>var result = string.replace(array,"");
  </code></pre>
  
  <p>The result would end up being: <code>The  and  ate the .</code></p>
  
  <p>Right now, <code>replace()</code> appears to only be replacing one value from the array. How can I make it so all/multiple values from the array are replaced in the string?</p>
  
  <p>Thanks!</p>