Displaying 1 result from an estimated 1 matches for "themasternone".
2007 Oct 09
1
returning from function within Array.each
function do_a_loop()
{
var fields = new Array(1,2,3,4);
fields.each(function(item))
{
if(item == 2){
return;
}
}
}
Im trying to do the following with prototype,
but I need to exit the do_a_loop() function not just the function
within each().
any ideas?
I was originally using a (for in) loop until we moved to using
prototype, now that we cannot use for in we have lost some