How to Remove a Property from a JavaScript Object
Sometimes in JavaScript, you need to remove a property from an object while keeping the rest of the object intact. This can be done using the delete operator or modern destructuring techniques. This guide explains both methods with examples, showing how to either mutate the original object or create a new object without certain properties.
How to Remove a Property from a JavaScript Object
coldshadow44 on 2025-10-13
Make a comment
_
2025-10-14
Method 1: Using the delete Operator
The simplest way to remove a property from an object is with the delete keyword. This mutates the original object:
You can also use a variable to dynamically delete a property:
Method 2: Using Object Destructuring (Non-Mutating)
If you want to create a new object without the property while leaving the original object intact, you can use destructuring with the rest operator:
Key Points