4.17.11
3.10.1
2.4.2
1.3.1

_.concat(array, [values])

Creates a new array concatenating array with any additional arrays and/or values.

Since

4.0.0

Arguments

argument
array
[values]
type
Array
...*
description
The array to concatenate.
The values to concatenate.

Returns

(array)

Example

var array = [1];
var other = _.concat(
  array,
  2,
  [3],
  [[4]]
);

console.log(other);
// => [1, 2, 3, [4]]

console.log(array);
// => [1]
var array = [1];
var other = _.concat(array, 2, [3], [[4]]);

console.log(other);
// => [1, 2, 3, [4]]

console.log(array);
// => [1]