 <p>Just call <code>.replace()</code> again:</p> <pre><code> var someVar = 'Hello I am a string'; var modified = someVar.replace('Hello', 'Goodbye').replace('am', 'was'); console.log(modified); // Goodbye I was a string </code></pre> <p>Remember that the <code>String.replace()</code> javascript method is actually like a combination of PHP's <code>str_replace()</code> and <code>preg_replace()</code> - the first argument can be a regex as well as a string. So you can also do:</p> <pre><code> var someVar = 'Hello I am a string'; var modified = someVar.replace(/(hello|string)/ig, 'Goat!').replace('am', 'was'); console.log(modified); // Goat! I was a Goat! </code></pre>