← Back to challenges

ES6: Destructuring Arrays III

JavaScriptHardlanguage_fundamentalsarrays

Instructions

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.

javascript
Loading editor…
⌘ ↡ to run
Walks through the solution with reasoning and edge cases.
Next: Half, Quarter and Eighth β†’