detect :: Enumerable
detect(iterator) -> firstElement | undefined
Finds the first element for which the iterator returns true. Aliased by the find method, which is considered the more readable way of using it.
See also
Enumerable: find
Prototype API 1.5.0 - prototypejs.org