Created
December 13, 2016 12:34
-
-
Save aherve/a1c9a7596afad95aa49d106ca9148f06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Foo { | |
| constructor (name) { | |
| this.name = name | |
| } | |
| greet () { | |
| console.log('hello, this is ', this.name) | |
| } | |
| someThingAsync () { | |
| return Promise.resolve() | |
| } | |
| asyncGreet () { | |
| this.someThingAsync() | |
| .then(this.greet) | |
| } | |
| } | |
| new Foo('dog').asyncGreet() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment