Javascript - Deleting Properties
📖 Read the lesson
Code Life
By Pierre Marsaa
The delete Keyword
To remove a property completely, use the
delete
keyword followed by the property. Zap's nickname is dropped:
↗️
Loading editor...
↶
▶️ Run
↷
After
delete
, the key is gone: reading it gives
undefined
, like any missing property. The other properties are untouched.
Verify