append() Function


append( array, value )

Appends a value or values to the given array, and returns the resulting array.

See also:

  • insert(): Use this function to add items to the beginning or middle of an array.
  • joinarray(): Use this function to insert a string element between each item in the resulting array.


Keyword Type Description


Any Type Array

The array to modify.


Any Type or Any Type Array

The value or values to append.


Any Type Array

Usage considerations

Only the first value parameter is required.


Append one item to an array

append({10, 20, 30, 40}, 50) returns 10, 20, 30, 40, 50

Append an array to an empty array

append({}, {60, 70}) returns 60, 70

Append one array to another

append({10, 20, 30, 40}, {50, 60, 70}) returns 10, 20, 30, 40, 50, 60, 70

Append multiple arrays to an original array

append({"Red", "Green"}, {"Blue", "Yellow"}, {"Brown", "White"}) returns Red, Green, Blue, Yellow, Brown, White

Open in Github Built: Tue, May 23, 2023 (06:12:33 PM)

On This Page