Tell us what’s happening:
Describe your issue in detail here.
I wasn’t really sure that the question was or what they expected us to do so I came with a solution that is an overkill, however, it should be correct according to their tests.
The failed test is that I’m not using the spread operator which is not true. I’m using the operator as seen below.
Your code so far
const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
let arr2;
arr2 = [].concat(...arr1); // Change this line
console.log(arr2);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36
Challenge: Use the Spread Operator to Evaluate Arrays In-Place
Link to the challenge: