DEV Community 👩‍💻👨‍💻

Discussion on: Destructuring Assignment in ES6- Arrays

Collapse
sayopaul profile image
Sayo Paul

I am not sure I understand your question fully but like the article explains , in this case , the array contains one element , "hello" and thus it overrides the default value of the first variable greet whilst the second variable is its default value as the array doesn't have a second element 🙂 .