The delete operator is use to deletes a property from an object, or removes an element from an array.
Syntax
delete expression
Where expression is a valid JavaScript expression that usually (but does not have to) result in a property name or array element.
Example
If the result of expression is an object, the property specified in expression exists, and the object will not allow it to be deleted, false is returned.
In all other cases, true is returned.
See also: Operator Behavior, Operator Precedence, Operator Summary |