---
name: "up.util.findResult"
area: "API"
kind: "JavaScript function"
parent: "up.util module"
url: "https://unpoly.com/api/up.util.findResult"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.util module](https://unpoly.com/api/up.util.md)</nav>

# up.util.findResult(list, tester)

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

Returns `undefined` if the function does not return a truthy value for any element in the list.

---

## Parameters {#parameters}

### list {#list}

(required)

Type: [List](https://unpoly.com/api/List.md) | Iterator

### tester {#tester}

(required)

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

Type: Function(element): any

---

## Return value {#return-value}

Type: any | undefined

