arr 原始数组数据
count 每个数组里面元素个数
function splitIpLit(arr,count) {
let i = 0;
let newArr = [];
while(i < arr.length) {
newArr.push(arr.slice(i, i+=count));
}
return newArr;
}
let aaa = splitIpLit([1,2,3,4,5,6,7,8,9,0],5);
console.log(aaa)