DEV Community

Discussion on: Object Destructuring in JavaScript for Beginners 🛴

wicked7000 profile image

Might be worth noting that you can 'skip' indexes in array destructing by doing:

const [,,biology] = scores;

Although I admit I think when you use array destructuring like this it looks awful. So it's probably only useful if you need to skip one or two items and pull out a bunch. (Rather than using it for a single index as I did above)

But great post!

nemo011 profile image
Nemo Author

Thank you for the tip. 😊