Created
November 11, 2021 11:38
-
-
Save Elijah-trillionz/be72478af5f78542483805004a137533 to your computer and use it in GitHub Desktop.
easily delete two or more properties from an object
This file contains hidden or 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 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