Skip to content

Instantly share code, notes, and snippets.

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