title: multiple replaces with javascript
body: <p>In PHP, you do this to replace more then one value at a time.</p>
  
  <pre><code>&lt;?php
  $string = "i am the foobar";
  
  $newstring = str_replace(array('i', 'the'), array('you', 'a'), $string);
  
  echo $newstring;
  ?&gt;
  </code></pre>
  
  <p>How do you do this in javascript?</p>