I’m looking for a way to stop iterations of underscore.js _.each()
method, but can’t find the solution. jQuery .each()
can break if you do return false
.
Is there a way to stop underscore each()?
_([1,2,3]).each(function(v){
if (v==2) return /*what?*/;
})