Sep 21, 2021
Hello and sure!
No, they get named through the array destructuring, and it is items that are being destructured. Maybe this clarifies it:
const arr = [1, 2, 3];
const [first, ...rest] = arr;
first // = 1
rest // = [2, 3]
Hello and sure!
No, they get named through the array destructuring, and it is items that are being destructured. Maybe this clarifies it:
const arr = [1, 2, 3];
const [first, ...rest] = arr;
first // = 1
rest // = [2, 3]
Software architect and developer with web and functional JavaScript close to his heart. Worked many years with web solutions mainly within the IoT field.