ES6: Destructuring Arrays III

Published by Isaac Pak in

You can assign variables from arrays with destructuring like this:

const arr = ["eyes", "nose", "lips", "ears"]
let [eyes, nose, lips, ears] = arr

But you can also skip over items in the array being destructured.

Notes

Check the Resources tab for more examples.

Watch a quick demo on how Edabit works.