Here is my code below, i would like to see improvement suggestions if there is!
function chunkArrayInGroups(arr, size) {
let momArr = [...arr];// momArr for Momentary Array, just a name...
let finalArr = [];
while (momArr.length > 0) {
let localArr = momArr.splice(0, size);
finalArr.push(localArr);
}
return finalArr;
}