let arrays = [[1, 2, 3], [4, 5], [6]];

let array = arrays.reduce((a, b) => a.concat(b), []);
console.log(array);
// → [1, 2, 3, 4, 5, 6]

function flatten(arr) {
	return arr.reduce((flat, current) => flat.concat(current));
}

Add chapter 5, exercise 1
Add chapter 5, exercise 1
