Edit this page

up.util up.util.findResult(list, tester)
JavaScript function

This feature is experimental. Please share your experiences so we know what to keep or change.

Consecutively calls the given function which each element in the given list. Returns the first truthy return value.

Returned undefined iff the function does not return a truthy value for any element in the list.


Parameters

list ListorIterator
tester Function(element): any

A function that will be called with each element and (optional) iteration index.

Return value

anyorundefined