Tell us what’s happening:
Describe your issue in detail here.
Sorry i’m a noob here, i just started coding few month ago from scratch. I can’t figure out why my code doesn’t show the real length of the array. I wold pass this challenge if only the length was the real one.
function chunkArrayInGroups(arr, size) {
let array = [];
for (let i = 0; i < arr.length; i++){
let arr1 = arr.splice(0, size);
array.push(arr1);
}
return array;
}
console.log(chunkArrayInGroups(["a", "b", "c", "d"], 2));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
Challenge: Chunky Monkey
Link to the challenge: