Skip to content

Instantly share code, notes, and snippets.

@nonseodion
Created March 13, 2020 06:32
Show Gist options
  • Save nonseodion/581680f23ae852892549a020cbca767d to your computer and use it in GitHub Desktop.
Save nonseodion/581680f23ae852892549a020cbca767d to your computer and use it in GitHub Desktop.
let ifebhor = {
carol: "rude",
damian: "caring",
mac: "handsome",
flora: "cute",
aave: "class bully"
}
// If Flora repeats a class. I'll have to remove her name from the object a way
//to do that would be to use the rest parameter.
let {flora, …rest} = ifebhor;
console.log(flora);
//cute
console.log(rest);
//Object { carol: "rude", damian: "caring", mac: "handsome", aave: "class bully" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment