Try Strict

Strict mode, a feature of ECMAScript 5, enables the developer to opt-into a more restrictive variant of JavaScript. By marking the top of the script block or function with the "use strict” directive, the compiler will provide early warnings and errors for common coding mistakes, and restrict the usage of some dark corners of the JavaScript language.

This demo gives you some code samples to let you see how they interact with Strict Mode. Try out some of your own script to see if it’s strict clean!

Select a sample or write your own code:

  Run Code