title: JavaScript/jQuery equivalent of LINQ Any()
body: <p>Is there an equivalent of <code>IEnumerable.Any(Predicate&lt;T&gt;)</code> in JavaScript or jQuery?</p>
  
  <p>I am validating a list of items, and want to break early if error is detected. I could do it using <code>$.each</code>, but I need to use an external flag to see if the item was actually found:</p>
  
  <pre><code>var found = false;
  $.each(array, function(i) {
      if (notValid(array[i])) {
          found = true;
      }
      return !found;
  });
  </code></pre>
  
  <p>What would be a better way? I don't like using plain <code>for</code> with JavaScript arrays because it iterates over all of its members, not just values.</p>