Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To remove an object in Node.js, you can use the delete keyword followed by the object property you want to remove. Here is an example:

const myObject = { name: 'John', age: 30 };

// Remove the 'age' property from the object
delete myObject.age;

console.log(myObject); // Output: { name: 'John' }

This will remove the age property from the myObject object.