jQuery jAM, Season 6

Exercise 5.1

Flattening

	 
	var arrays = [[1, 2, 3], [4, 5], [6]];
	console.log(arrays.reduce(function(flat,current){
		return flat.concat(current);
	},[]));

	 
	

To open the JavaScript console, press F12 or on MAC press COMMAND-OPTION-I.