Hi, I have a jQuery for-each loop on an array and wonder if it is possible to leave the loop early.
$(lines).each(function(i){ // some code if(condition){ // I need something like break; } });
break;
actually doesn't work, for a reason.
If I'd write a for-loop it would look like that (but I don't want that):
for(i=0; i < lines.length; i++){ // some code if(condition){ break; // leave the loop } };
Thanks in advance -Martin