The `delete` operator is used to remove a property from an object. It only affects its https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn[own] properties. There are two valid ways to remove a property:
`delete identifier` may work if `identifier` is a *configurable* property of the global object. For `identifier` to be *configurable*, it should have been declared directly as a `globalThis` property (`globalThis.identifier = 1`). This form is not common practice and should be avoided. Use `delete globalThis.identifier` instead if needed.
* Variables declared with `var` cannot be deleted from the global or a function's scope, because while they may be attached to the global object, they are *non-configurable*. In CommonJS and ECMAScript modules, top-level variable declarations are scoped to the module and not attached to the global object.
* Variables declared with `let` or `const` are not attached to any object.
\[~ann.campbell.2] Assign to you for validation and completion (labels, SQALE). CC [~linda.martin]
=== on 4 Jun 2015, 14:10:16 Ann Campbell wrote:
\[~elena.vilchik] I've updated the description based on \https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete, which shows that _sometimes_ ``++delete++`` does work on things that might be thought of as variables (even though they're really properties of the global object.)