Skip to content

Instantly share code, notes, and snippets.

@brunosabot
Created March 30, 2022 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunosabot/52db659b2f4df71c6e16de618d132582 to your computer and use it in GitHub Desktop.
Save brunosabot/52db659b2f4df71c6e16de618d132582 to your computer and use it in GitHub Desktop.
const user = {
password: "0123456789abcdef",
salt: "1a2b3c",
name: "Bruno Sabot",
email: "bruno@example.org",
};
const { password, salt, ...restOfUser } = user;
console.log(password); // 0123456789abcdef
console.log(salt); // 1a2b3c
console.log(restOfUser); // {name: "Bruno Sabot", email: "bruno@example.org"};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment