klyn.collections.ArraySync.operator[]
method

    public native operator[](index as Int) as T

Description

Returns or replaces the element at the given index.

Negative indexes are accepted and count from the end of the array.

    import klyn.collections

    values = fs:["left", "right"]
    print(values[-1])    # right

Parameters

Parameter | Description
--- | ---
`index` | Zero-based index, or a negative index from the end.

Throws

- IndexException if index is outside the array bounds.