I understand what the problem is asking just don’t know how to go about it . I wanted to use rest parameter but not sure how i would even go about it without changing the top line but thats not what its asking. I guess another way i thought about it is to destructure assignment maybe assigning to a different variable then use rest param on the rest IDK MY head hurts I’m gonna take a nap and come back to see what you guys suggest. I do feel like there is probably a extremely simple way to do this, and once i figure it out i will feel dumb for thinking too much about this
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 arr = list; // Change this line
// Only change code above this line
return arr;
}
const arr = removeFirstTwo(source);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
.
Challenge: Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements
Link to the challenge: