length
Returns the number of characters in a string, or the length of an array.
Type: transform
Aliases
count, size
Parameters
- input (unknown): The input can be a string, an array, or an object.
Returns
Type: number
The number of characters in a string, or the length of an array.
Examples
javascript
length("hello") // 5javascript
length([1, 2, 3]) // 3