wondering why there is no bracket on my code?
it is the exact same method as the solution.
**Your code so far**
function chunkArrayInGroups(arr, size) {
let bigArr = [];
let smArr = [];
//let i = 0;
for(let i = 0; i < arr.length ; i++){
smArr.push(arr[i]);
console.log("aaa " + smArr);
if(i >= size){
bigArr.push(smArr);
console.log("bbbb " + bigArr);
//i = 0;
smArr = [];
console.log("ddd " + smArr);
}
}
console.log("cccc " + bigArr);
return bigArr;
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Challenge: Chunky Monkey
Link to the challenge: