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!