Skip to content

Instantly share code, notes, and snippets.

@veritstudio
Last active January 8, 2019 17:57
Show Gist options
  • Save veritstudio/c428df407e5ca8769cf4f27823954db1 to your computer and use it in GitHub Desktop.
Save veritstudio/c428df407e5ca8769cf4f27823954db1 to your computer and use it in GitHub Desktop.
Declaring variables in strict mode
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