Created
December 26, 2017 05:34
-
-
Save PavanKu/b5a40114bb5b8f09548e011e68beb930 to your computer and use it in GitHub Desktop.
Strict Mode in JS
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 foo () { | |
'use strict'; | |
console.log("Simple function call") | |
console.log(this === window); | |
} | |
foo(); //prints false on console as in “strict mode” value of “this” in global execution context is undefined. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment