Skip to main content

findIndex

The position of the first matching element, or -1

findIndex(arr: array, predicate: closure) -> int

Arguments​

NameType
arrarray
predicateclosure

Example​

{{ findIndex([1, 5, 9], # > 3) }}

Returns 1.