Strict mode
JavaScript'sstrict mode is a way toopt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode". Strict mode isn't just a subset: itintentionally has different semantics from normal code.
Strict mode for an entire script is invoked by including the statement"use strict"; before any other statements.
In this article
See also
- Strict mode
- Related glossary terms: