klyn.collections.Array.indexOf
method
public native indexOf(item as T, start as Int = 0) as Int
Description

Returns the first index of the given element.

import klyn.collections

values = f:[10, 20, 10]
print(values.indexOf(10, 1))  # 2
Parameters
ParameterDescription
itemElement to search.
startZero-based index where the search starts.
Returns

First matching index, or -1.