Recursive solution not able to pass even a single test case :
Code
var globalArr = [];
function chunkArrayInGroups(arr, size) {
if(arr.length <= size) {
return globalArr.push(arr) && globalArr;
}
return globalArr.push(arr.slice(0, size)) && chunkArrayInGroups(arr.slice(size), size);
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);
Browser information:
Your Browser User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
.
Link to the challenge: