Javascript Array.forEach HowTo break?

Posted by Scott on Stack Overflow See other posts from Stack Overflow or by Scott
Published on 2010-04-14T21:57:31Z Indexed on 2010/04/14 22:03 UTC
Read the original article Hit count: 135

Filed under:
|
[1,2,3].forEach(function(el) {
  if(el === 1) break;
});

How can I do this using the new forEach method of JS?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about arrays