Adds an item to the end of an array, or returns a new array if list is null or undefined.
list
Same as [...list, x].
[...list, x]
append(12)([3, 6, 9])// => [3, 6, 9, 12]append(12)(undefined)// => [12] Copy
append(12)([3, 6, 9])// => [3, 6, 9, 12]append(12)(undefined)// => [12]
Generated using TypeDoc
Adds an item to the end of an array, or returns a new array if
list
is null or undefined.Same as
[...list, x]
.