A challenge of “Spread Operator” works well even if I don’t put the Spread Operator: CHALLENGE: " ES6: Use the Spread Operator to Evaluate Arrays In-Place"
I have commented/deleted the right code and put another code without Spread Operator >> The challenge passed successfully!
Tip 2 didn’t implemented as well:... spread operator should be used to duplicate arr1 .
The Code mentioned below
const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
let arr2;
// arr2 = [...arr1]; // Change this line
arr2 = arr1;
console.log(arr2);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36.
Challenge: Use the Spread Operator to Evaluate Arrays In-Place
Whilst the mentioned solution is incorrect, it does not go against the aim of the lesson - teaching students to use the spread operator. Yes, you have not done as expected, but you had to write the code necessary to make a shallow copy (albeit in comment). So, clearly, you understood the use of the operator.
All in all, I do not see a need to change the tests.