Skip to main content
Array helpers provide operations for working with lists and collections.

first

Returns the first element of an array.
Example:
Output: Apple

last

Returns the last element of an array.
Example:
Output: Cherry

at

Returns the element at a specific index (zero-based).
Example:
Output: Banana

join

Joins array elements into a string with a separator.
Examples:
Output: javascript, nodejs, api
Output: javascript | nodejs | api

length

Returns the length of an array, string, or object.
Examples:
Output: 3

contains

Returns true if the array contains a value.
Example:

sum

Calculates the sum of array values or a specific property.
Examples:
Output: 60
Output: 60

average

Calculates the average of array values or a specific property.
Examples:
Output: 86.25

max

Returns the maximum value in an array.
Examples:
Output: 49.99

min

Returns the minimum value in an array.
Examples:
Output: 19.99

Practical Examples

Order Summary

Tag List

Price Range

Statistics

Invoice Totals

Author List