How do I chop off arrays and rearrange them to a new one

I’ve this kind of arrays that generated from other function:


[[0], [0,0,0,0]]
[[1], [1,1,1,1]]
[[2], [2,2,2,2]]
[[3], [3,3,3,3]]

I want to rearrange it to:


[[0,0,0,0], [1,1,1,1], [2,2,2,2], [3,3,3,3]]

or better yet:


[0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3]

How could I do this.
This is my experiment so far and it’s still far from working:


var a = [[0], [0,0,0,0]];
var b = [[1], [1,1,1,1]];
var c = [[2], [2,2,2,2]];
var d = [[3], [3,3,3,3]];

var e = [];
var f = [];
var g = [];
var h = [];

function x(data) {
	switch(data[0].toString()) {
		case '0':
			e = data[1];
			break;
		case '1':
			f = data[1];
			break;
		case '2':
			g = data[1];
			break;
		case '3':
			h = data[1];
			break;
	}
	var i = e.concat(f, g, h);
	console.log(i); // [0, 0, 0, 0]
					// [0, 0, 0, 0, 1, 1, 1, 1]
					// [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2]
					// [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]
}

x(a);
x(b);
x(c);
x(d);

I want only the last result of the var i, provided that data sent is in the above order.
Thank you,

Possibly like this?

var a = [[0], [0,0,0,0]];
var b = [[1], [1,1,1,1]];
var c = [[2], [2,2,2,2]];
var d = [[3], [3,3,3,3]];

var e = a.concat(b,c,d);
var f = e.reduce(function(a, b) {return a.concat(b);});
console.log(f);

Hi felgall,

Thank you. You’re a superman.