Skip to content

Instantly share code, notes, and snippets.

@talha08
Created October 29, 2018 17:21
Show Gist options
  • Save talha08/e6703dba54c21ff2b3a3298c8447babe to your computer and use it in GitHub Desktop.
Save talha08/e6703dba54c21ff2b3a3298c8447babe to your computer and use it in GitHub Desktop.
const student = {
firstname: 'Jhon',
lastname: 'Snow',
country: 'England'
};
const { firstname:firstName, lastname:lastName, country:origin} = student;
console.log(`We are talking about ${firstName} ${lastName}, who came from ${origin}`)
//"We are talking about Jhon Snow, who came from England"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment