You misunderstood what the slice parameters mean. The second one is the index until which (not included) you want to get the subarray. It's not a length.
array.slice(from, to); // not array.slice(from, length)
function chunkArrayInGroups(arr, size) {
var myArray = [];
for(var i = 0; i < arr.length; i += size) {
myArray.push(arr.slice(i, i+size));
}
return myArray;
}
console.log(chunkArrayInGroups(["a", "b", "c", "d"], 2));