I tried resolving the “Use the spread operator to evaluate arrays in place” challenge, a little bit differently than the solution provided. I had the same result. And I am curious as to why my approach might not be acceptable.

This is my code:

const arr1 = [‘JAN’, ‘FEB’, ‘MAR’, ‘APR’, ‘MAY’];

let arr2;

arr2 = .concat(…arr1); // Change this line


Aside from the fact that concat takes as parameters one or more arrays? It may be working, and it isn’t actually wrong, but the spread here serves no purpose.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.