User Tools

Site Tools


java-script:strict-mode

This is an old revision of the document!


Strict mode

The “use strict” directive in JavaScript was introduced in ES5 to help you catch common coding mistakes and “unsafe” actions like assigning values to read-only variables or using some of the reserved keywords.

When you put “use strict” at the top of your JavaScript code or function, the JavaScript interpreter will switch to the Strict Mode, and it will start to catch and throw errors for actions that would be ignored or would fail silently in normal, non-strict code.

java-script/strict-mode.1690304592.txt.gz · Last modified: 2023/07/25 20:03 by odefta