ES6 - Use the Spread Operator to Evaluate Arrays In-Place

**This is what I’ve been doing It’s not going
Please I need help

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

arr2 = [‘JAN’, ‘FEB’, ‘MAR’, ‘APR’, ‘MAY’]; // Change this line

console.log(…arr2);

const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
let arr2;

arr2 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];  // 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/109.0.0.0 Safari/537.36

Challenge: ES6 - Use the Spread Operator to Evaluate Arrays In-Place

Link to the challenge:

The assignment asks you to use the spread operator to copy the contents of arr1 into arr2 without actually copying the contents.

You copied the contents of the array, which is not what the goal of the assignment is. Please read the instructions one more time carefully. If you need more help, MDN also explains it in great detail:

Spread Syntax on MDN

Thanks for your explanation :smiley: :heart:

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