klyn.collections.ArrayList.lastIndexOf
method

    public native lastIndexOf(item as T, start as Int = -1) as Int

Description

Returns the last index of the given element.

Parameters

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

Returns

The last matching index, or `-1`.

Example

    data = [10, 20, 10]
    print(data.lastIndexOf(10))  # 2