javascript des éléments restants d'un tableau à une variable utilisant la syntaxe de propagation

const arrValue = ['one', 'two', 'three', 'four'];

// destructuring assignment in arrays
// assigning remaining elements to y
const [x, ...y] = arrValue;

console.log(x); // one
console.log(y); // ["two", "three", "four"]
SAMER SAEID