Skip to content

Comment on ES6 in Depth: Destructuringparent

Comments

It would probably have looked like this:

  var email = article.email,
    at = email.indexOf("@"),
    ident = email.substr(0, at),
    domain = email.substring(at + 1, email.lengt);
AboutSource Built by g1lg1l

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