Skip to content

Comment on ES6 in Depth: Destructuringparent

Comments

I 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!"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.