Find the number of elements in an array.
count(@array: [any]): number
Arguments
Name | Type | Description | Required |
---|---|---|---|
array | [any] | The array whose length will be returned. | Yes |
Returns
number
- A number.
Examples
arr1 = [10, 20, 30]
assert(count(arr1), isEqualTo = 3)