array.append()

Append an element to an Array.

Signature

append(element: T) => Array<T>

Description

The append() method appends the given element to the Array.

The source Array isn’t changed.

Parameters

Parameter Type Required Description

element

Any

Yes

Element to append to the Array.

Return value

Type Description

Array

Array with element appended to the source elements.

Examples

[1, 2].append(3)
[
  1,
  2,
  3
]

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!