Implement the Chunky Monkey Algorithm - Implement the Chunky Monkey Algorithm

Tell us what’s happening:

everything is working completely but still the test is not clearing

Your code so far

function chunkArrayInGroups(arr,num){
  let newArray = [];
  
  for (let i = 0; i < arr.length; i+=num) {
   newArray.push(arr.slice(i,i+num));
  }
  console.log(newArray);
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);
chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Implement the Chunky Monkey Algorithm - Implement the Chunky Monkey Algorithm
https://www.freecodecamp.org/learn/full-stack-developer/lab-chunky-monkey/implement-the-chunky-monkey-algorithm

what is your function returning?

Your function must have “return“

Please do not necropost, especially to say the same thing someone else already said.