For Strict mode, we using
use strict to execute
The purpose of
use strict is to indicate that the code should be executed in "strict mode".
Strict mode changes previously accepted "bad syntax" into real errors.
Strict mode is declared by adding
Declared inside a function, it has local scope (only the code inside the function is in strict mode).
x = 5; // This does not cause an error.
x = 5; // This causes an error