title: check to see if all values inside an array is a number
body: <p>I need a way to check if an array only contains numbers. 
  For example</p>
  
  <pre><code>var a = [1,2,3,4] should pass and give true boolean
  
  whereas var b = [1,3,4,'a'] should give false
  </code></pre>
  
  <p>I tried forEach() function as</p>
  
  <pre><code>a.forEach(function(item, index, array) {
      if(!isNaN(item)) {
          array.unshift("-");
      }
  });  //console.log of this will give array a = ["-","-","-","-", 1,2,3,4]
  </code></pre>
  
  <p>but since, forEach() iterates through every index in the array, and since every item for var a is a number, it unshifts to array every item it iterates. I need a way to only unshift "-" once if the whole array value is a number.</p>
  
  <p>I also tried to do with test()</p>
  
  <pre><code>var checkNum = /[0-9]/;
  console.log(checkNum.test(a)) //this gives true 
  
  console.log(checkNum.test(b)) // this also gives true since I believe test     
                                //only checks if it contains digits not every 
                                //value is a digit.
  </code></pre>