Q. What will be the result?

Code:
const obj = {name: 'John'};
delete obj.name;
console.log(obj.name);
  • (A) undefined
  • (B) John
  • (C) null
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) undefined
Explanation: The delete operator removes the property from the object.
Explanation by: Chandani
The delete operator removes the property from the object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
110
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
80%
Success Rate