arrayConcat

arrayConcat(array array1, array array2) → array newArray
Chains given arrays together. String keys are kept while numerical keys are reindexed.

Returns a new list containing all the elements of the lists passed as parameters, placed end to end. This function is equivalent to list1 + list2.

Example:

var list1 = [1, 2]
var list2 = [3, 4]
debug(arrayConcat(list1, list2)) // [1, 2, 3, 4]
const list1 = [1, 2]
const list2 = [3, 4]
Debug.log(list1.concat(list2)) // [1, 2, 3, 4]
list1 = [1, 2]
list2 = [3, 4]
Debug.log(list1 + list2)  # [1, 2, 3, 4]
Parameters
Return
Synonyms