klyn.collections.LinkedList.indexOf
method

    public native indexOf(item as T, start as Int = 0) as Int

Description

Returns the first index of the given element.

Parameters

Parameter | Description
--- | ---
`item` | The element to search for.
`start` | Zero-based index where the search starts.

Returns

The first matching index, or `-1`.

Example

    data = l:[10, 20, 10]
    print(data.indexOf(10, 1))  # 2