Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on ES6 is beautiful. Parent comment
`({ id, option = true, name = 'unnamed' }) => // ...`
replaces
``` function(userObject) {
const id = userObject.id; const option = userObject.option || true; const name = userObject.name || 'unnamed'; // ...
I think this comparison speaks for itself. In pre-es6 code bases you TONS of code that looks like the second.
There are no comments on this comment yet.
`({ id, option = true, name = 'unnamed' }) => // ...`
replaces
``` function(userObject) {
} ```I think this comparison speaks for itself. In pre-es6 code bases you TONS of code that looks like the second.