delete now triggers “temporal dead zone”

Published: | Categories: JavaScript


The concept of the “temporal dead zone”, defined in ECMAScript 6 for the const and let statements, has been applied to the delete operator as well. As described in the document, if this operator is used in a function, a variable with the same name cannot be redeclared afterward, but rather it raises a ReferenceError.