ArrayUtil - concat(Array parent, Array child)

Merge two arrays.

Table 1. Parameters
Name Type Description
parent Array An array to merge
child Array An array to merge
Table 2. Returns
Type Description
Array An array of elements from both input arrays. Duplicates are not removed.

var arrayUtil = new ArrayUtil();
var a1 = new Array("a", "b", "c");
var a2 = new Array("c", "d", "e");
 
gs.print("concat a1, a2: " + arrayUtil.concat(a1, a2));

Output: concat a1, a2: a,b,c,c,d,e