title: javascript string with white spaces how to get an array of strings from it that without whitecaps in it?
body: <p>I have this string:</p>
  
  <pre><code>myStringtoSplit = "SomeText     123"
  </code></pre>
  
  <p>I want to get an array that has only 2 things in it:
  [SomeText,123]</p>
  
  <p>I am now using split():</p>
  
  <pre><code>var array = myStringtoSplit.split(" ");
  </code></pre>
  
  <p>doing so though gives me an array with length 6. So the array has at [0] = "SomeText"
  between index 1 and 4 has white spaces and then at index 5 it has "123"</p>
  
  <p>How can I make the resulting array only have the two strings in it with no white spaces?</p>
  
  <pre><code>So I want end up with this:
  [SomeText,123]
  </code></pre>