WebGlossary.info
Strict mode
- A restricted variant of JavaScript, contrasted with “sloppy mode.” Strict mode intentionally has different semantics from normal code. Browsers that don’t support strict mode run strict mode code with different behavior from browsers that do, so strict mode shouldn’t be relied on without testing. Strict mode code and non-strict mode code can coexist, so scripts can opt into strict mode incrementally. Strict mode makes several changes to normal JavaScript semantics, like eliminating some silent JavaScript errors by having them thrown, fixing mistakes that make it difficult for JavaScript engines to perform optimizations, and prohibiting syntax likely to be defined in future versions of ECMAScript. Strict mode is triggered by
'use strict';
. ← MDN Web Docs - → Limited-quirks mode
- Previous term: Streaming media
- Next term: String
- Random term: Login