js将数组拆分为两个一组的二维数组

var arr= [];
for(var i=0;i<data.length;i+=2){
    arr.push(data.slice(i,i+2));
}
原文地址:https://www.cnblogs.com/zaco/p/13644586.html