Skip to content

Instantly share code, notes, and snippets.

@camelcaseblog
Last active July 22, 2019 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camelcaseblog/85cefee48bf978e7bdcadae2f15bd86a to your computer and use it in GitHub Desktop.
Save camelcaseblog/85cefee48bf978e7bdcadae2f15bd86a to your computer and use it in GitHub Desktop.
class A {
f = () => { console.log(1); }
g = () => setTimeout(() => this.f(), 1000)
}
function f() { console.log(2); }
var a = new A()
a.g()
> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment