Language concepts

Strict mode

Try the free JavaScript compiler

Strict code uses stricter language rules, including rejecting assignment to unresolvable names. Modules and class bodies are strict by definition. Strict mode does not isolate code from the host or guarantee security. Ordinary functions with simple parameter lists may opt in through a directive.

Formal Syntax & Structure

javascript syntaxjavascript
"use strict";

Working Example

Example Snippetjavascript
function getReceiver() { "use strict"; return this; }console.log(getReceiver());
JavaScript Reference