for (var i = 0; i < 10; i++) { arr.push(i) } function arrSlice(arr, num) { var arr1 = []; for (var i = 0; i < arr.length / num; i++) { arr1.push(arr.slice(num * i, num * i + num)) } return arr1; }
var arr3=[];
arr3 = arrSlice(arr, 2) //将数组弄成下标分组
for (var i = 0; i < 10; i++) { arr.push(i) } function arrSlice(arr, num) { var arr1 = []; for (var i = 0; i < arr.length / num; i++) { arr1.push(arr.slice(num * i, num * i + num)) } return arr1; }
var arr3=[];
arr3 = arrSlice(arr, 2) //将数组弄成下标分组