How do I go to the next iteration of a JavaScript Array.forEach()
loop?
For example:
var myArr = [1, 2, 3, 4];
myArr.forEach(function(elem){
if (elem === 3) {
// Go to "next" iteration. Or "continue" to next iteration...
}
console.log(elem);
});
MDN docs only mention breaking out of the loop entirely, not moving to next iteration.