what is strict mode in java script 3f

Solutions on MaxInterview for what is strict mode in java script 3f by the best coders in the world

showing results for - "what is strict mode in java script 3f"
Anton
03 Sep 2016
1Strict mode changes previously accepted "bad syntax" into real errors.
2
3As an example, in normal JavaScript, mistyping a variable name creates a 
4new global variable. In strict mode, this will throw an error, making it 
5impossible to accidentally create a global variable.
6
7In normal JavaScript, a developer will not receive any error feedback assigning
8values to non-writable properties.
9
10In strict mode, any assignment to a non-writable property, a getter-only 
11property, a non-existing property, a non-existing variable, or a non-existing 
12object, will throw an error.
13
14Strict mode makes it easier to write "secure" JavaScript.