i got passed this challenge but i just feel like i used to much arithmetic or there was a much easier way. Would this solution be considered bad practice?
function chunkArrayInGroups(arr, size) {
// Break it up.
var result=[];
var miniarray=[];
var i=0;
while ( i<arr.length/size ){
result.push(arr.slice(i * size,size+(size * i)));
i++;
}
return result;
}
chunkArrayInGroups([0,1,2,3,4,5], 2);