Created
January 18, 2018 15:04
-
-
Save matt-mcalister/3f060bf32d292cfebc9448e210e043e2 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
function resolveLater() { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve('finish'); | |
}, 2000); | |
}); | |
} | |
async function asyncCall() { | |
console.log('let'); | |
var result = await resolveLater(); | |
console.log(result); | |
// expected output: "resolved" | |
} | |
console.log("I'ma") | |
asyncCall(); | |
console.log("you") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment