Using length
on a string will return the number of letters, numbers, symbols, and whitespace characters.
Lists will return the number of items in the list.
Note that using length
on an empty
value — like "".length()
— will return 0
, while a list of empty
values will still return the number of items.
Numbers will be formatted as strings before their length is calculated.
Dates, on the other hand, are seen as a single object, so will always return 1
when length
is applied directly.