Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Last active January 3, 2018 18:07
Show Gist options
  • Save gonaumov/c4656bddc01b50d49dc8600f4132a4a9 to your computer and use it in GitHub Desktop.
Save gonaumov/c4656bddc01b50d49dc8600f4132a4a9 to your computer and use it in GitHub Desktop.
// Until now I didn't know about this.
// We can change name of destructed
// variable or function.
const {first: third, second: fourth } = {
first: () => console.log('first'),
second: () => console.log('second')
}
third()
fourth()
@gonaumov
Copy link
Author

gonaumov commented Jan 3, 2018

This will show 'first' and 'second' in console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment