Created
May 27, 2020 14:45
-
-
Save fhsinchy/9a6753308a6c688a30ed12f9949b152c to your computer and use it in GitHub Desktop.
This file contains 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
let globalThis = this; | |
function func1() { | |
console.log('Global This: ', globalThis); | |
console.log('Local This: ', this); | |
console.log('Are they same?', globalThis === this); | |
} | |
func1() | |
// Global This: Window | |
// Local This: Window | |
// Are they same? true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment