FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. For more details, review the migration guide. Contact support@fauna.com with any questions. |
Prepend
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Prepend( elems, base )
prepend( elems, base )
Prepend( elems, base )
Prepend( elems, base )
Prepend( elems, base )
Description
The Prepend
function creates a new Array that is the result
of combining the elems
followed by the base
Array. This
function only works with Arrays, not with Pages.
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
Array |
The base Array. |
|
Value or Array |
The elements to add to the beginning of the base Array. |
Examples
A new array containing the elems
array values, (1, 2, 3), followed by
the array
values, (4, 5, 6):
[ 1, 2, 3, 4, 5, 6 ]
[1, 2, 3, 4, 5, 6]
[1 2 3 4 5 6]
Arr(LongV(1), LongV(2), LongV(3), LongV(4), LongV(5), LongV(6))
[ 1, 2, 3, 4, 5, 6 ]
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!