title: Find value in array then return true with Angular forEach
body: <p>I'm learning JavaScript and AngularJS.</p>
  
  <p>What's the difference between this code?</p>
  
  <pre><code>function isInArrayNgForeach(field, arr) {
      angular.forEach(arr, function(value, key) {
          if(field == value)
              return true;
      });
      return false;
  } // This returns always false
  
  function isInArrayJavaScript(field, arr) {
      for(var i = 0; i &lt; arr.length; i++) {
          if(field == arr[i])
              return true;
      }
      return false;
  } // This works fine
  
  function isInArray() {
      var testArr = ['stack', 'over', 'flow'];
      console.log(isInArrayNgForeach('stack', testArr)); // return false
      console.log(isInArrayJavaScript('stack', testArr)); // return true
  }
  </code></pre>
  
  <p>My question is: why <strong>isInArrayNgForeach</strong> always return <em>false</em>?  I assume that because there is a function inside of the function, but I'm not sure why.</p>