trpika
Last Updated: February 12, 2017
·
948
· jamesh075
Trooper

How to merge multiple arrays into one - ES6

Very simple way to merge mutiple arrays into one:

const x = [['foo'], ['bar'], ['foobar']];
const y = [].concat(...x);
// y results to [ 'foo', 'bar', 'foobar' ]
Say Thanks
Respond