title: javascript string remove white spaces and hyphens
body: <p>I would like to remove white spaces and hyphens from a given string.</p>
  
  <pre><code> var string = "john-doe alejnadro";
   var new_string = string.replace(/-\s/g,"")
  </code></pre>
  
  <p>Doesn't work, but this next line works for me:</p>
  
  <pre><code>var new_string = string.replace(/-/g,"").replace(/ /g, "")
  </code></pre>
  
  <p>How do I do it in one go ?</p>