len

Returns the length of the given value.

Accepts arrays, objects and strings.

Examples

len([0, 0, 0]) // 3
len({"foo": "bar", "hello": "world"}) // 2
len("hello") // 5

Last updated