Files
30-seconds-of-code/snippets/concat.md
Angelos Chalaris 9ebbe62fb9 Update concat.md
Improved description a little.
2017-12-14 12:16:25 +02:00

246 B

Concat

Use Array.concat() to concatenate and array with any additional arrays and/or values, specified in args.

const ArrayConcat = (arr, ...args) => arr.concat(...args); 
// ArrayConcat([1], [1, 2, 3, [4]]) -> [1, 2, 3, [4]]