Skip to content

Comment on ES6 in Depth: Destructuringparent

Comments

Whoops, my last line contains a major typo and should read `{a} = myThing;`. And you've dutifully carried over my typo to your example :D

But regardless, the corrected version of your example: `let a; ({a} = {a:5});` works like a charm and is very handy! Thanks for the tip!

AboutSource Built by g1lg1l

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