Skip to content

Instantly share code, notes, and snippets.

@nonseodion
Last active March 13, 2020 13:05
Show Gist options
  • Save nonseodion/dc86636cd4d324d43ef0434e41163c64 to your computer and use it in GitHub Desktop.
Save nonseodion/dc86636cd4d324d43ef0434e41163c64 to your computer and use it in GitHub Desktop.
//If I am a new student who just got
//introduced to some of the siblings
//I might just give them some attributes
//based on their physical appearance.
let ifebhor = { carol: "rude",
damian: "caring"
};
//we just pick a property for each
//of them which will be overriden
//if it's present already
const {carol = "beautiful",
aave = "muscular",
flora = "short"} = ifebhor;
console.log("Aave looks " + aave +
" for his age while Flora is too " + flora +
" for her age. Don't even talk about Carol she's "
+ carol +".");
//Aave looks muscular for his age while Flora is too short for her age.
//Don't even talk about Carol she's rude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment