List.indexOf
indexOf($value) -> number
Description
Find the first position of $value
in the List.
If value
is not found, 0
is returned.
['a', 'b', 'c', 'b', 'a'].indexOf('b') //= 1 ['a', 'b', 'c'].indexOf('X') //= 0
Find the first position of $value
in the List.
If value
is not found, 0
is returned.
['a', 'b', 'c', 'b', 'a'].indexOf('b') //= 1 ['a', 'b', 'c'].indexOf('X') //= 0