Skip to content

Instantly share code, notes, and snippets.

@debbysa
Last active February 3, 2021 05:13
Show Gist options
  • Save debbysa/b764bc09b23c79bcbc1c534c404fccf9 to your computer and use it in GitHub Desktop.
Save debbysa/b764bc09b23c79bcbc1c534c404fccf9 to your computer and use it in GitHub Desktop.
const book = {
"title": "Manusia Setengah Salmon",
"author": "Raditya Dika",
"publisher": {
"name": "Gagas Media",
"address": "Jakarta Selatan"
}
}
// destructuring
const {title, author, publisher:{name, address}} = book;
console.log(title, author, name, address);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment