Array.indexOf
indexOf — Returns the first position of the element with the given value.
Description
Array.indexOf([integer search, [integer offset]])
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
search | integer | Yes | ||
offset | integer | Yes |
Return values
integer.
Examples
Example #1 – indexOf example
See also
Array.lastIndexOf()