24.7. Array.concat( ): concatenate arraysECMAScript v324.7.1. Synopsisarray.concat(value, ...) 24.7.1.1. Arguments
24.7.1.2. ReturnsA new array, which is formed by concatenating each of the specified arguments to array. 24.7.2. Descriptionconcat( ) creates and returns a new array that is the result of concatenating each of its arguments to array. It does not modify array. If any of the arguments to concat( ) is itself an array, the elements of that array are concatenated, rather than the array itself. 24.7.3. Examplevar a = [1,2,3]; a.concat(4, 5) // Returns [1,2,3,4,5] a.concat([4,5]); // Returns [1,2,3,4,5] a.concat([4,5],[6,7]) // Returns [1,2,3,4,5,6,7] a.concat(4, [5,[6,7]]) // Returns [1,2,3,4,5,[6,7]] 24.7.4. See AlsoArray.join( ), Array.push( ), Array.splice( ) |