Back to search

Strict mode and 'use strict' in JavaScript

Strict mode opts JavaScript into safer behavior by preventing some silent mistakes and tightening runtime rules.

JavaScript Easy Theory

Strict mode and 'use strict' in JavaScript

Strict mode opts JavaScript into safer behavior by preventing some silent mistakes and tightening runtime rules.

  • Disallows some sloppy-mode behavior
  • Catches accidental globals more quickly
  • Modules are strict by default

Strict mode and 'use strict' in JavaScript