SyntaxFix
Write A Post
Hire A Developer
Questions
just return true inside your if statement
var myArr = [1,2,3,4]; myArr.forEach(function(elem){ if (elem === 3) { return true; // Go to "next" iteration. Or "continue" to next iteration... } console.log(elem); });