Skip to content

Instantly share code, notes, and snippets.

@nonseodion
Last active March 13, 2020 13:13
Show Gist options
  • Save nonseodion/ce6c8d50441c889b520646265bdd7703 to your computer and use it in GitHub Desktop.
Save nonseodion/ce6c8d50441c889b520646265bdd7703 to your computer and use it in GitHub Desktop.
// To call them by their first names without the lastname
// we have to destructure this object.
//This object describes what we perceive of each child
//Object name - Lastname, Property name - firstname
let ifebhor = {
carol: "rude",
damian: "caring",
mac: "handsome",
flora: "cute",
aave: "class bully"
}
// ifebhor is destructred
// notice the object literal at the
//left of the assignment operator
const{carol, damian, aave} = ifebhor;
console.log("Carol is so " + carol +
" but I love Damian he's " + damian +
" and Aave is the " + aave +".");
/*Carol is so rude but I love Damian he's caring
and Aave is the class bully.*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment