const numbers = [1, 2, 3, 4, 5]; const [first, ...rest] = numbers; console.log(first); // Output: 1 console.log(rest); // Output: [2, 3, 4, 5]
const numbers = [1, 2, 3, 4, 5]; const [first, ...rest] = numbers; console.log(first); // Output: 1 console.log(rest); // Output: [2, 3, 4, 5]