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