Last active
January 8, 2019 17:57
-
-
Save veritstudio/c428df407e5ca8769cf4f27823954db1 to your computer and use it in GitHub Desktop.
Declaring variables in strict mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assignStrict() { | |
"use strict"; | |
someValue = 1; // error | |
} | |
function assignWithoutStrict() { | |
someValue = 1; // no errors | |
} | |
assignStrict(); | |
assignWithoutStrict(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment