Hi,
How can I achieve the equivalent of the following code with a
Hash.each() iterator ? :
function f() {
...
for (var i in o) {
if (!o.isOk) {
return;
}
}
... //not always executed
}
My problem is how to implement the RETURN statement.
For if I write this :
function f() {
...
myHash.each (
function(item) {
if (!o.isOk) {
return;
}
}
);
... //always executed !!!
}
here the return statement is equivalent of a simple break of the loop,
whereas I really want to quit the top function !
Any idea ?
Christophe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---