Signature: listLength(list: List<T>) -> int
Description: Returns the number of elements in a list. O(1).
Parameters
- list (List): The list
Returns: int
Example
listLength([1, 2, 3]) // 3
Signature: listLength(list: List<T>) -> int
Description: Returns the number of elements in a list. O(1).
Returns: int
listLength([1, 2, 3]) // 3