function colSplit(arr, c){
var res = new Array(c);
for(var i=0;i<c;++i){
res[i] = [];
}
for(var i=0;i<arr.length;++i){
res[i%c].push(arr[i]);
}
return res;
}
var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
console.log(colSplit(a, 3))