Categories
JavaScript

JavaScript’s “Use Strict”

use strict : “use strict”; Defines that JavaScript code should be executed in “strict mode”.

Strict mode : Strict mode defines that you can not use any variable before initializing it. It is a restricted variant of ECMAScript 5, for faster performance and easier debugging.

Sometimes you’ll see the default, non-strict mode referred to as “sloppy mode“. This isn’t an official term, but be aware of it, just in case.

 

Here Example of use strict and why this use

 

All information collected from: w3schools, A youtube Channel ( Code Insights ), developer.mozilla,

For more informetion