I'm refactoring old code and I use Enumerable.each() wherever
possible. I've came to problem like this:

function checkSomething (arr)
    for (i=0 ; i < arr.length ; i++) {
        var c = arr[i];
        if (c == 15) return true;
    }
    return false;
}

My question is can I do "short-circuit" return from inside
each( function (c) {...} ) ? When I do return it's just like old throw
$continue and it's not what I mean.

Greetings,
Tomasz Kalkosiński


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to