News for hackers. Stuff that matters.
Re:Destructuring and Recursion in ES6 by marxama on Monday February 02, 2015 @01:05PM (#8985602)
That's really nice. Is it possible to do the destructuring directly in the argument list?
Re:Destructuring and Recursion in ES6 by peferron on Monday February 02, 2015 @02:09PM (#8986084)
Yes:

    const description = ({name: {first, last}, occupation}) => `${first} is a ${occupation}`;
Edit: just noticed that `last` is not used, so we can remove it from the destructuring:

    const description = ({name: {first}, occupation}) => `${first} is a ${occupation}`;