Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Console.table(). Parent comment
const { some: { nested: { field } } } = tree; // field === tree.some.nested.field
or rename things while you destructure them:
const { crappyFieldName: betterName } = myObject; // betterName === myObject.crappyFieldName
Now I can't stop using this feature...
There are no comments on this comment yet.
const { some: { nested: { field } } } = tree; // field === tree.some.nested.field
or rename things while you destructure them:
const { crappyFieldName: betterName } = myObject; // betterName === myObject.crappyFieldName
Now I can't stop using this feature...