Tell us what’s happening:
I can get the proper results as an array, but the formatting is incorrect and the answer is marked wrong. I had this happen in another array challenge too. If someone can point me as to what I’m messing up, it will probably fix both issues.
Thank you!
Your code so far
var all = [];
var stor = [];
function chunkArrayInGroups(arr, size) {
for (var i = 0; i < arr.length; i = i + size) {
stor = arr.slice(i,size + i);
all.push(stor);
stor = [];
}
return all;
}
//chunkArrayInGroups([“a”, “b”, “c”, “d”], 2);
//chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3);
//chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2)
chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2);
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/chunky-monkey