Created
June 30, 2019 19:11
-
-
Save camelcaseblog/05d727e98690a0a477a7fd5a010c5ba6 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
class A { | |
f() { console.log(1); } | |
g(){ setTimeout(function() { this.f(); }, 1000)} | |
} | |
function f() { console.log(2); } | |
var a = new A() | |
a.g() | |
> 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment