Skip to content

Comment on ES6 in Depth: Destructuringparent

Comments

It's really valuable for mistakes to result in clear errors rather than confusing but "valid" programs.

Even worse:

    let [a, b, c, d] = [2];
a receives 2. b, c, and d receive undefined.
AboutSource Built by g1lg1l

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