Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

delete

The delete operator is used to delete an object property.

Syntaxdelete object.property

Examples

Delete a property in a custom object. var obj = { a:"grape", b:"peach", c:"orange" }; delete obj.b; Delete a value from an array index(array length is not affected). var arr = ["cat", "dog", "bird"]; delete arr[1];

JavaScript

Operators

deleteinstanceofnewthistypeofternaryvoid