Last active
March 21, 2019 10:38
-
-
Save joelnet/dd2de9e1544758b7bcf08648ea2bcbd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const partial = { id: 100, name: 'Howard Moon' } | |
const user = { ...partial, id: 100, password: 'Password!' } | |
user //=> { id: 100, name: 'Howard Moon', password: 'Password!' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is written for 7 Tricks with Resting and Spreading JavaScript Objects