indexWhere()
Get the index of an element.
Signature
lastIndexWhere(predicate: () => Boolean | Null): Number | Null
lastIndexWhere(predicate: () => Boolean | Null, start: Number): Number | Null
Description
The indexWhere()
method searches, left-to-right, for the element that
matches predicate and returns the index of the element if a match is
found.
If the optional start is included, predicate searches right-to-left starting at start and returns the matching index, inclusive.
Return value
Type | Description |
---|---|
Index of element that matches predicate, or |
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!