title: using regular expressions to replace multiple values in a string in javascript
body: <p>I am trying to replace multiple string values at once from one variable and pass it into a new one from form data.</p>
  
  <p>My final outcome is to make a very simple (and crude) encrypt\decrypt program.
  This is what I have so far. I can't seem to find anything on where to go from here. </p>
  
  <pre><code>function testResults (form) {
      var TestVar = form.inputbox.value;
      var NewVar = TestVar.replace(/a/g, "b").replace(/b/g, "c");
      alert ("Replaced text: " + NewVar);
  }
  </code></pre>