4 ms·
That's really nice. Is it possible to do the destructuring directly in the argument list?
by marxama 12y ago
That's really nice. Is it possible to do the destructuring directly in the argument list?
- peferron 12y agoYes: 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}`;