Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Concatenation of arrays
* Concatenation of arrays
* @arguments Arrays
concatArrays = (...arrays) => {
var children = [].concat(...arrays);
return children;
let arr1 = ['a', 'c'];
let arr2 = ['d', 'g'];
let arr3 = ['d', 'f'];
console.log(concatArrays(arr1, arr2, arr3)); // ["a", "c", "d", "g", "d", "f"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.