Last active
February 6, 2018 20:39
-
-
Save fabriciofmsilva/929da7414b515b9d713b157c9f6117b3 to your computer and use it in GitHub Desktop.
Rest spread in object properties in ES2018
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
let { a, ...b } = { a: 'JS', x: 1, y: 2 }; | |
a; // JS | |
b; // { x: 1, y: 2 } | |
let n = { a, ...b } | |
n; // { a: 'JS', x: 1, y: 2 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment