Created
September 29, 2015 07:43
-
-
Save jo32/40f81d3fdcb441930369 to your computer and use it in GitHub Desktop.
es7async-example.js
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
| async function hello() { | |
| var a = await Promise.resolve('Hello '); | |
| return a; | |
| } | |
| (async function helloWorld() { | |
| var hello = await hello(); | |
| console.log(hello + 'World!'); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment