Skip to content

Instantly share code, notes, and snippets.

@OlivierJM
Last active August 7, 2018 14:59
Show Gist options
  • Save OlivierJM/43cc560ac482d9616e3f8d743807c6b4 to your computer and use it in GitHub Desktop.
Save OlivierJM/43cc560ac482d9616e3f8d743807c6b4 to your computer and use it in GitHub Desktop.
const person = {
name: "Johnaas",
job:"dev",
siblings: 2,
friends: "loading ..",
};
const { name, ...obj } = person;
console.log(name); // Johnaas
console.log(obj);
/*
Object {
friends: "loading ..",
job: "dev",
siblings: 2
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment