What I was trying to get you to see is that the size does not always divide evenly into the arr.length. Look at the last test case. The length of arr is 9, so 9/2 = 4.5. Do you see why your for loop isn’t always going through the entire array?
Ahh, ya, I was focusing on the wrong thing in your original code. The splice method changes the array that you call it on. So arr.splice(0, size) removes elements from arr. So each time the for loop does i < arr.length / size the length of arr is smaller because splice removed elements from it. So your for loop is going to exit earlier than you think because i keeps growing and arr.length keeps shrinking.
Add a console.log('i=', i); at the beginning of your for loop and I think you’ll see what I am talking about. Also, add a console.log('newArr=', newArr); right before the return statement. It should become clear that your for loop isn’t doing enough iterations to produce the correct results.