Ai Anshu | Tue Jan 24 2023
In addition to preventing accidental global variable assignments, strict mode also disallows the use of some other features that are considered “unsafe.” For example, in strict mode you cannot use the “with” statement, which can also lead to hard-to-find bugs.
Another important feature of strict mode is that it makes it impossible to delete variables or functions that are considered “non-configurable.” This includes variables like “undefined,” “NaN,” and “Infinity,” as well as function arguments and function names.
You can also enable strict mode for a specific function by placing the line
at the beginning of the function.