klyn.collections.Array.count
method

    public native count(item as T) as ULong

Description

Counts occurrences of the given element.

    import klyn.collections

    values as Int[] = Int[3]
    values[0] = 10
    values[1] = 20
    values[2] = 10
    print(values.count(10))     # 2

Parameters

Parameter | Description
--- | ---
`item` | Element to count.

Returns

Number of matching elements.