Array.len
Array.len
Function
Returns the number of array elements.
Syntax
array.len()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Int | Returns the length of the array. |
Example
items = [1, 2, 3] result = items.len() // Output: 3 print result
Notes
- Reading the length does not modify the array.