APPEND
Description
Syntax
APPEND(list, element)Example
APPEND(['a', 'b', 'c'], 'd')Difference from CONCAT
CONCAT(['a', 'b'], ['c', 'd'])APPEND(['a', 'b'], 'c')Last updated
Was this helpful?
APPEND returns a new list with a single element added to the end. Unlike CONCAT, which merges two lists together, APPEND takes an existing list and a single value and returns a new list containing all original elements followed by that value. The original list is not mutated.
APPEND(list, element)Returns: A new list with element appended.
APPEND(['a', 'b', 'c'], 'd')This returns ['a', 'b', 'c', 'd'].
CONCAT merges two lists:
CONCAT(['a', 'b'], ['c', 'd'])Returns ['a', 'b', 'c', 'd'].
APPEND adds a single element, not a list:
APPEND(['a', 'b'], 'c')Returns ['a', 'b', 'c'].
If you pass a list as the element to APPEND, it will be added as a nested list, not merged:
Returns ['a', 'b', ['c', 'd']].
Last updated
Was this helpful?
Was this helpful?
APPEND(['a', 'b'], ['c', 'd'])