⟩ What is Strict Mode in JavaScript?
► The fifth edition of ECMAScript specification has introduced Script Mode.
► Strict Mode applies a layer of constraint on JavaScript.
► It throws errors for actions that are problematic and didn't throw an error before.
► It throws errors for the actions which are potentially unsafe.
► It shut downs the functions which are poorly thought out.
► Strict mode solves mistakes that are responsible for the difficulty of JavaScript engines to perform optimizations.
► To enable the strict mode we have to add the string literal "use strict" on the top of file or function as follow :
function myfunction()
{
"use strict";
var v = "I am a strict mode function";
}