I need to be able to find the first element in an array that matches the condition implemented by a callback... dojo.filter loops through all elements... I need to end search after the first matching element is found.
Is there a way to do this?
dojo.find
Submitted by Les on Fri, 02/29/2008 - 19:25.
- Login or register to post comments
- Unsubscribe post

dojo.some is the closest we
dojo.some is the closest we have, I think. If the callback returns something which doesn't evaluate to false, like 0 or "", then you might even get the result back from dojo.some... otherwise, I guess you'd have to pass it through the closure or something?