title: Remove whitespaces inside a string in javascript
body: <p>I've read <a href="https://stackoverflow.com/questions/498970/how-do-i-trim-a-string-in-javascript">this question</a> about javascript trim, with a regex answer.</p>
  
  <p>Then I expect trim to remove the <em>inner</em> space between Hello and World.  </p>
  
  <pre><code>function myFunction() {
      alert("Hello World ".trim());
  }
  </code></pre>
  
  <p><strong>EDITED</strong></p>
  
  <p><strong>Why I expected that!?</strong> </p>
  
  <p>Nonsense! Obviously trim doesn't remove inner spaces!, only leading and trailing ones, that's how trim works, then this was a very wrong question, my apologies.</p>