How do you declare strict mode in JavaScript?

Posted by Andre Scott | Updated on

How do you declare strict mode in JavaScript?

The strict mode is declared by adding “use strict”; to the beginning of a script or a function. If declared at the beginning of a script, it has global scope.

and if you declare inside a function, it has local scope


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers