length
Returns the number of characters in a string, or the length of an array.
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
length("hello") // 5length([1, 2, 3]) // 3