Last active
March 8, 2019 04:38
-
-
Save danlourenco/87c4be9c29d5458fe45579b09cf3316a to your computer and use it in GitHub Desktop.
ES7 omit property via object rest operator
This file contains 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 myObject = { | |
a: 1, | |
b: 2, | |
c: 3 | |
}; | |
const { a, ...noA } = myObject; | |
console.log(noA); // => { b: 2, c: 3 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment