Created
August 13, 2019 19:23
-
-
Save miguelmota/0acc344bbb8d0decbe6b3fe74d06a7d8 to your computer and use it in GitHub Desktop.
JavaScript omit property in object spread example
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 props = {foo: 1, bar: 2, qux: 3} | |
const {foo, ...other} = props | |
console.log(foo) // 1 | |
console.log(other) // {bar: 2, qux: 3} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment