JS delete operator

The delete operator deletes an object, an object's property, or an element at a specified index.

delete variableName delete objectExpression.property delete objectExpression["property"] delete objectExpression[index] delete property // legal only within a with statement

The fifth form is legal only within a with statement, to delete a property from an object. You can use the delete operator to delete variables declared implicitly but not those declared with the var statement. If the delete operator succeeds, it removes the property from the object entirely, although this might reveal a similarly named property on a prototype of the object. Some object properties cannot be deleted. In the ECMA 262 specification these are marked as DontDelete. The delete operator returns false only if the property exists and cannot be deleted. It returns true in all other cases.