Tell us what’s happening:
Why do the tests not pass if I change ‘…arr’ to something else, such as ‘…somethingElse’?
Your code so far
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
// Only change code below this line
const [a, b, ...arr] = list;
// Only change code above this line
return arr;
}
const arr = removeFirstTwo(source);
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36
.
Challenge: Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements
Link to the challenge: