title: loop through array, returns odd and even numbers
body: <p>I am teaching myself code and am trying to solve this problem: </p>
  
  <p>Write a loop that loops through nums, if the item is even, it adds it to the evens array, if the item is odd, it adds it to the odds array.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>var nums = [1,2,34,54,55,34,32,11,19,17,54,66,13];
  var evens = [];
  var odds = [];
  
  var evenNumbers = function(nums) {
      for (var i = 0; i &lt; nums.length; i++) {
  
          if ((nums[i] % 2) != 1) {
              evens.push(nums[i]);
                  console.log(evens);
          }
          else {
              odds.push(nums[i]);
                  console.log(odds);
          }
      }
  
  };
  
  alert(evens);
  alert(odds);
  </code></pre>
  
  <p>They don't return anything and I'm not sure where I'm going wrong, any help would be much appreciated.</p>