1.4 KiB
1.4 KiB
title | description | menu | weight | introduced | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
length() function | `length()` returns the number of elements in an array. |
|
101 | 0.7.0 |
length()
returns the number of elements in an array.
Function type signature
(<-arr: [A]) => int
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
arr
Array to evaluate. Default is the piped-forward array (<-
).
Examples
Return the length of an array
people = ["John", "Jane", "Abed"]
people |> length()// Returns 3