Skip to content

Instantly share code, notes, and snippets.

@matheus-rossi
Last active July 10, 2018 15:39
Show Gist options
  • Save matheus-rossi/a11e01e4965fbbebfa82a62f1e621979 to your computer and use it in GitHub Desktop.
Save matheus-rossi/a11e01e4965fbbebfa82a62f1e621979 to your computer and use it in GitHub Desktop.
// Objeto Inicial
const refeicao = {
id: 1,
descricao: 'Café da Manhã'
}
// Destructuring + Rest - Removendo valores
const { id, ...refeicaoSemId } = refeicao
console.log(refeicaoSemId) // { descricao: 'Café da Manhã' }
console.log(id) // 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment