And that’s why I asked you to explain us your logic: because you were close, but were missing a few key points.
Let’s think in pseudo-code for a moment:
We have an array and a size param, and we want to group the item based on this size.
So we need to loop over the array, but we don’t really need to visit each element, just the ones that match with size. For example think about a [0 … 10] array, where the size is 2.
What we really care is looking at the number that will start the “boxing”:
0, 2 ,4, 6, 8.
How do we do that? We can simply increment the index of the loop by size
as in:
for (let i = 0; i < arr.length; i += size)
So that if the size this time is 4 we loop over: 0, 4, 8; and so on.
Now we need a way to “box” the values into a new array. You already decided to use slice
, which is an appropriate choice… let’s head over the documentation to review it before implementing the code:
The slice()
method returns a shallow copy of a portion of an array into a new array object selected from start
to end
( end
not included) where start
and end
represent the index of items in that array. The original array will not be modified.
Scroll down a bit to read about params:
start
Optional. Zero-based index at which to start extraction.
and
end
Optional
Zero-based index before which to end extraction. slice
extracts up to but not including end
. For example, slice(1,4)
extracts the second element through the fourth element (elements indexed 1, 2, and 3).
[…]
If end
is greater than the length of the sequence, slice
extracts through to the end of the sequence ( arr.length
).
Interesting: seems like if we declare an end that is greater than the actual length, JS will guard us and give back up to length, that’s neat!
So now we already know how that our loop index is the “start” of where we want to box our values, so
at this point end needs to start up to the actual size we need, so for example if size is 4:
[0 up to 4], [4 up to 8], [8 up to 12]
And we don’t even need to worry if 12 > array.length
as the documentation told us about. So
or in code:
for (let i = 0; i < arr.length; i += size) {
newArray.push(arr.slice(i, i + size));
}
Hope it’s clearer now.
Personal note: I know that sometimes it’s frustrating and all we want to do is progress. But I really feel like by looking at the suggestion you missed the opportunity of re-thinking your logic and come up with this solution yourself: as you see you were really close 
Be more confident 
Good luck and happy coding.