Skip to content

Instantly share code, notes, and snippets.

@Elijah-trillionz
Created November 11, 2021 11:38
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 Elijah-trillionz/be72478af5f78542483805004a137533 to your computer and use it in GitHub Desktop.
Save Elijah-trillionz/be72478af5f78542483805004a137533 to your computer and use it in GitHub Desktop.
easily delete two or more properties from an object
const removeProps = (obj, ...propsName) => {
propsName.forEach((propName) => {
delete obj[propName]
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment