indexOf Method
Looks up the index of an element comparing equal to the specified value using binary search.
indexOf(value: T): number
Parameter | Type | Description |
---|---|---|
value | T | The value to search for |
Returns - the index of the first equivalent element in the array, or -1 if no such element exists.
Defined in
Last Updated: 08 January, 2020