Created
July 30, 2018 18:05
-
-
Save kristyburge/e5459f0154bd796e8221edb3b7c7078a to your computer and use it in GitHub Desktop.
When 'this' is used in a normal function context
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
function test() { | |
console.log('hello world'); | |
console.log(this); | |
} | |
test(); | |
// hello world | |
// Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, frames: Window, …} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment