Array

Array methods and properties.

Description

Array methods are provided for working with multiple items grouped under a single identifier.

Arrays are immutable.

Static methods

Method Description

Create an ordered Array of integers, given start and end values.

Instance properties

Property Description

Get the length of an Array.

Instance methods

Method Description

Aggregate all the elements in the Array.

Test if any element passes the test of the given function.

Append an element to an Array.

Get the Array element at a given index.

Create an Array by concatenating two Arrays.

Get unique elements.

Drop elements given a count of elements to drop.

Add the index to every Array element.

Test if every Array element passes the given function test.

Create an Array of elements filtered by a Function.

Get the first value in the Array.

Get the first Array value that matches the given predicate.

Create an Array by applying a Function to each Array element, then flatten the result by one level.

Flatten the Array elements.

Reduce the Array to a single, accumulated value by applying a function to each element. Iterates through elements from left to right. Uses a provided seed as the initial value.

Reduce the Array to a single, accumulated value by applying a function to each element. Iterates through elements from right to left. Uses a provided seed as the initial value.

Execute a function for each Array element.

Test if the Array includes the given value.

Get the Array index of the first element that matches the given value.

Get the index of an Array element that matches the given predicate.

Test if the Array is empty.

Get the last element in an Array.

Get the index of the last Array element that matches the given value.

Get the index of the last Array element that matches the predicate.

Get the last element value that matches the given predicate.

Create an Array by executing a Function for each Array element.

Reduce an Array to a single, accumulated value by applying a function to each element. Iterates through elements from left to right. Uses the first element as the initial value.

Reduce an Array to a single, accumulated value by applying a function to each element. Iterates through elements from right to left. Uses the first element as the initial value.

Reverse the order of the Array elements.

Create an Array from the elements of another Array.

Get an Array with the first Number of Array values.

Convert a Array to an Set.

Convert an Array to a String representation.

Get a subarray of matching Array values.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!