Last active
August 17, 2019 05:54
-
-
Save rintoandrews90/b1c440ce733d194fe1cea9540cf33939 to your computer and use it in GitHub Desktop.
Short hand & destructure node.js
This file contains hidden or 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
const name ='rinto' | |
const age = 10 | |
const user = { | |
name, | |
age, | |
location:'thrissur' | |
} | |
console.log(user) | |
const user = { | |
username:'rinto andrews', | |
userage:10, | |
location:'thrissur' | |
} | |
console.log(user) | |
const {username,userage} = user | |
console.log(username) | |
const user = { | |
username:'rinto andrews', | |
userage:10, | |
location:'thrissur' | |
} | |
console.log(user) | |
const {username:name,userage} = user | |
console.log(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment