Having problem Destructuring via rest elements

I am doing the lesson Destructuring via rest elements but everything is correct only this error"

Failed: Destructuring on list should be used.

My code soo far

const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
 // Only change code below this line
"use strict";
const [,,...arr] = list;

 // Only change code above this line
 return arr;
}
const arr = removeFirstTwo(source);
console.log(arr);

I can’t figure out how to solve this error …Pls help !!

You have to use the shorterList identifier found in the starting code. You can’t rename it to arr.

Regarding the test’s it says it only runs in order to complete this task:

~ Tests ~

  • removeFirstTwo([1, 2, 3, 4, 5]) should be [3, 4, 5]

  • removeFirstTwo() should not modify list

  • Array.slice() should not be used.

  • Destructuring on list should be used.

your code works fine…

The dev. that set this task up is either being picky or didn’t realize changing the new array identifier doesn’t matter at all; End result is still the same. :rofl:

IT WORKS THANK YOU !! :slightly_smiling_face: