delete Keyword

Syntax

delete expression

Where expression should evaluate to a property reference, e.g.:
delete object.property
delete object['property']

Parameters

object
The name of an object, or an expression evaluating to an object.

property
The property to delete.

Return value

true for all cases except when the property is an Object.hasOwn non-configurable property, in which case, false is returned in non-strict mode.


Exceptions

Throws TypeError in strict mode if the property is an own non-configurable property.