This method is like findIndex except that it searches for a given value directly, instead of using a predicate function.
The index of the found value, else -1
indexOf([1, 2, 1, 2], 2)// 1// Search from a `start` index.indexOf([1, 2, 1, 2], 2, 2)// 3
The array to inspect.
The value to find
Optional
The index to search from.
Generated using TypeDoc
This method is like findIndex except that it searches for a given value directly, instead of using a predicate function.
Returns
The index of the found value, else -1
Example
See