Skip to main content

Arguments

string
required
The key of the list.
unknown
required
The element to match.
number
The rank of the element to match. If specified, the element at the given rank is matched instead of the first element.
number
The maximum number of elements to match. If specified, an array of elements is returned instead of a single element.
number
Limit the number of comparisons to perform.

Response

The index of the matching element or an array of indexes if opts.count is specified.