Skip to content

Instantly share code, notes, and snippets.

@PavanKu
Created December 26, 2017 05:34
Show Gist options
  • Save PavanKu/b5a40114bb5b8f09548e011e68beb930 to your computer and use it in GitHub Desktop.
Save PavanKu/b5a40114bb5b8f09548e011e68beb930 to your computer and use it in GitHub Desktop.
Strict Mode in JS
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