This lesson will explain the solution to the problem in the previous lesson.
function removeFirstTwo(list) { const [, , ...arr] = list; return arr;} var arrLiteral = [8,9,10,11,12]console.log("arr contains: " + removeFirstTwo(arrLiteral))
The solution to this is straightforward. Let’s go over it in detail and start by discussing the array destructuring syntax.
The following is an array literal:
var arrLiteral = [8,9,10,11,12]