JavaScript » Array » concat

Syntax:
Array.concat(arrayName2, arrayName3, ..., arrayNameN)

The concat method joins two or more Array objects producing one new one. The original Array objects are unaffected by this but, if one copy of a string or number is altered, it is not reflected in the other, whereas a change to an object reference can be seen in both copies.

Examples

Code:
Cats.concat(trees, cars)
Explanation:

This example adds the elements of the array 'cars' onto the array 'trees' on to the 'Cats' array.