Skip to content

Instantly share code, notes, and snippets.

@arthurbergmz
Created November 14, 2017 06:04
Show Gist options
  • Save arthurbergmz/3c65bd305bc4d1926a73254607e8ad93 to your computer and use it in GitHub Desktop.
Save arthurbergmz/3c65bd305bc4d1926a73254607e8ad93 to your computer and use it in GitHub Desktop.
Property removal using the spread operator
function removeProperty (object, propertyName) {
const { [propertyName]: removed, ...response } = object
return response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment