Array
Array methods and properties.
Description
Array methods are provided for working with multiple items grouped under a single identifier.
Arrays are immutable.
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. |
|
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. |
|
Get the first value in the Array. |
|
Get the first array value that matches the given predicate. |
|
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. |
|
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. |
|
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!