JavaScript

2次元配列を1次元配列にする。

More than 5 years have passed since last update.

Array.prototype.concat.applyを使う。

var ary = [[1,2,3,4,5,6,7],[8,9,10],[11,12]];

var ary2 = Array.prototype.concat.apply([],ary);
/*
ary2 == [1,2,3,4,5,6,7,8,9,10,11,12];
*/