Array.concat()

JavaScript 1.2+, JScript 3.0+ Nav4+, NES3+, IE 4+ Syntax

							array.concat(arg1,…argN)

Description

The concat() method adds the elements listed in the parameter list to the end of the existing array and returns the result. The original is not changed by this method. Should any of the arguments be Array, the elements of that array are concatenated to the array that called the method.

Table 6.9 lists the argument and return values associated with this method.

Table 6.9. Arguments and Return Values Associated with concat()
Type Item Description
Arguments arg1,…argN The parameter list of the concat() method contains one or more elements to be concatenated to the end of the array.
Returns The original array with the new concatenated ...

Get Pure JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.