title: Determining if an array contains an even number
body: <p>I'm new to javascript and am trying to get a feel for the language. Here's a function I wrote which is supposed to return true if an array contains an even number and false if it does not.</p>
  
  <pre><code>var containsEvenNums = function(numArray) {
      numArray.forEach(function(element) {
          if(element % 2 == 0) {
              return true;
          }
      });
      return false;
  };
  
  var main = function() {
      var nums = [1,2,3,4];
  
      console.log("This array contains even number(s): " + containsEvenNums(nums));
  };
  </code></pre>
  
  <p>I know that this has something to do with AJAX and callback functions, but since I'm new to the language, can you explain why exactly my code is returning "undefined"?</p>