title: Removing two words from text from string javascript
body: <p>Hey I'm looking at removing words from a string, thing is the word to replace could be two different words.</p>
  
  <p>e.g.</p>
  
  <pre><code>foo = "stringtest";
  id = foo.replace('string', '');
  </code></pre>
  
  <p>or</p>
  
  <pre><code>foo = "paragraphtest";
  id = foo.replace('paragraph', '');
  </code></pre>
  
  <p>at the moment I've approached the problem as so.</p>
  
  <pre><code>foo = "paragraphtest";
  id = foo.replace('paragraph', '');
  id = foo.replace('string', '');
  </code></pre>
  
  <p>I know this code could easily be improve but I don't know how :( thanks for your assistance.</p>