Edit this page

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

This feature is experimental. It may be changed or removed in a future version.

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