concat
Merge many collections together into a List.
list.concat(...args)
Parameters
- args
{Array|can-list|*}
:Any number of arrays, Lists, or values to add in For each parameter given, if it is an Array or a List, each of its elements will be added to the end of the concatenated List. Otherwise, the parameter itself will be added.
concat
makes a new List with the elements of the List followed by the elements of the parameters.
var list = new List();
var newList = list.concat(
'Alice',
['Bob', 'Charlie']),
new List(['Daniel', 'Eve']),
{f: 'Francis'}
);
newList.attr(); // ['Alice', 'Bob', 'Charlie', 'Daniel', 'Eve', {f: 'Francis'}]