I'm getting the exact right output seemingly but tests wont pass

Tell us what’s happening:
It seems like the output of my function matches the desired output and yet the tests dont pass… this time i dont think it’s a simply syntax error but not sure can someome please take a look

Your code so far


function chunkArrayInGroups(arr, size) {
let chunkymonkey = [];

while(arr.length>size){
  let chunky = [];
  for(let i =0; i<size; i++){
    chunky.push(arr.shift());
  }
  chunkymonkey.push(chunky)
}
if(arr.length>0){
   chunkymonkey.push(arr);
}
 
console.log(chunkymonkey)
}

chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36.

Challenge: Chunky Monkey

Link to the challenge:

It does not look like your function has a return statement.

DOH! thank you my mistake lol :slight_smile: