I’ve checked other solutions but I believe I have declared everything, I return the right array and everything is inside the function. I just don’t see it. Here’s the code:
···
function chunkArrayInGroups(arr, size) {
for(let index = 0; index < size; index++)
let subarr = [];
subarr.push(arr.splice(0, size));
arr.push(subarr);
}
return arr;
}
···