Skip to content

Instantly share code, notes, and snippets.

@rintoandrews90
Last active August 17, 2019 05:54
Show Gist options
  • Save rintoandrews90/b1c440ce733d194fe1cea9540cf33939 to your computer and use it in GitHub Desktop.
Save rintoandrews90/b1c440ce733d194fe1cea9540cf33939 to your computer and use it in GitHub Desktop.
Short hand & destructure node.js
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