public native count(item as T) as ULong
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
| Parameter | Description |
|---|---|
item | Element to count. |
Number of matching elements.