Created
October 13, 2016 18:22
-
-
Save emilong/bcb94171cbf25d286ac6bcb3f8c4b6bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple renaming to avoid collisions or just as a preference. | |
const a = 5; | |
const { a: b } = { a: 3 }; | |
console.log(b); // prints 3 | |
// rename for another API and use enhanced object literal notation. | |
function verifyUser({ userId: id }) { | |
return User.update({ id, verified: true }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment