what is strict mode in javascript?
The normal JavaScript is sometimes referred to as sloppy mode.
JavaScript's strict mode intentionally has different semantics from normal code.
Browsers not supporting strict mode will run strict mode code with different behavior from browsers that do, so don't rely on strict mode without feature-testing for support for the relevant aspects of strict mode.
Invoking strict mode
Strict mode applies to entire scripts or to individual functions.