Use strict mode

The “use strict” directive switches the engine to the “modern” mode, changing the behavior of some built-in features. We’ll see the details later in the tutorial. Strict mode is enabled by placing “use strict” at the top of a script or function. Several language features, like “classes” and “modules”, enable strict mode automatically. Strict mode is supported by all modern browsers. We recommended always starting scripts with “use strict”. All examples in this tutorial assume strict mode unless (very rarely) specified otherwise.