indexOf

indexOf
(
T
)
(
T[] array
,)

Return Value

Type: integer

the index of an element in an array, negative one if not found

Examples

assert([0, 1, 2].indexOf(1) == 1);
assert([0, 1, 2].indexOf(4) == -1);

Meta