Skip to content

Instantly share code, notes, and snippets.

@joelnet
Created March 1, 2019 07:21
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 joelnet/7e50ff766c33863c243b87b2ab92a982 to your computer and use it in GitHub Desktop.
Save joelnet/7e50ff766c33863c243b87b2ab92a982 to your computer and use it in GitHub Desktop.
const user = { id: 100, name: 'Howard Moon'}
const userWithPass = { ...user, password: 'Password!' }
user //=> { id: 100, name: 'Howard Moon' }
userWithPass //=> { id: 100, name: 'Howard Moon', password: 'Password!' }
@joelnet
Copy link
Author

joelnet commented Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment