InterviewHubPRO
Section Overview
Q75

Question 75 of 521

Part 2: Promises, Callbacks, Async & Strict Mode (54 - 103)

14%
JavaScript Internals (521 Qs)•Part 2: Promises, Callbacks, Async & Strict Mode (54 - 103)

What is the purpose of the delete operator

The delete operator is used to delete the property as well as its value.

javascript
var user = { firstName: "John", lastName: "Doe", age: 20 };
delete user.age;

console.log(user); // {firstName: "John", lastName:"Doe"}