Learn JavaScript
Advanced Array Methods


The the concat() method copies elements from other arrays into a new array. It does not modify the original arrays.

In the example given above, the array numbers contains the elements of both the evenNumbers array as well as the oddNumbers array.

Other than arrays, the concat() method accepts strings, numbers or boolean as arguments too.