javascript doesn't correctly return from the loop
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1900172/jquery-each-method-does-not-return-value">jQuery each method does not return value</a>  </p>
</blockquote>



<p>It seems the return statement does not break the loop and return the function. The following code keeps return false....</p>

<pre><code>var __in__ = function(elem, array){
    // $.each(array, function(index, item) {  
   array.forEach(function(index, item) {
        if (item == elem)
            return true;
    });
    return false;
};


console.log(__in__(3,[1,2,3]));
</code></pre>
