0
How do I use the concat() method for multiple arrays?
1 Answer
+ 1
`concat` takes as many parameters as you wish! `[1].concat([2],[3],[4]); // [1,2,3,4]`.
If you have an array of arrays and want to concat them all, you can do
```
var arrays = [[1],[2],[3],[4,5]];
Array.prototype.concat.apply([], arrays); // [1,2,3,4,5]
```
But this is admittedly a bit of weird-looking javascript black magic.