I completed this challenge on my own and i want someone to review my code.I noticed that i solved all the challenges in a different way than the forum solutions,most of the times with more lines of code and it makes me feel bad cause i know you have to optimize your code as much as possible, but this is how think what can i do for it?
Anyway check the code i created for the last challenge,i am pretty sure that if you tell me some days from now to do it the same way i will not be able to do it like this .Still i am very proud i completed the 95% of basic algorithms on my own.Thank you freeCodeCamp.
function chunkArrayInGroups(arr, size) {
let chunks =arr.length/size;
let array2=[];
for(let i=0;i<chunks;i++){
array2[i]=arr.slice(i*size,(i*size)+size);
}
return array2;
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);