Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created August 13, 2019 19:23
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 miguelmota/0acc344bbb8d0decbe6b3fe74d06a7d8 to your computer and use it in GitHub Desktop.
Save miguelmota/0acc344bbb8d0decbe6b3fe74d06a7d8 to your computer and use it in GitHub Desktop.
JavaScript omit property in object spread example
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