Comment on ES6 in Depth: DestructuringparentComments−tracker111yI believe in this case articles[0] is pulling a specific article (object) from an array of objects, then destructuring that instance.. articles.forEach(article => { let { title, content, email } = article; ... }) Might have made that more clear... but .forEach is an ES5 addition...Given the backlash with ES6, I wonder why we didn't see this with ES5... "OMG they added extra sugar to Array.prototype, we're all gonna die!"
Comments
I believe in this case articles[0] is pulling a specific article (object) from an array of objects, then destructuring that instance..
Might have made that more clear... but .forEach is an ES5 addition...Given the backlash with ES6, I wonder why we didn't see this with ES5... "OMG they added extra sugar to Array.prototype, we're all gonna die!"