Created
August 22, 2017 08:04
-
-
Save gaurav21r/61bd738156f4207b866e00a617127e75 to your computer and use it in GitHub Desktop.
Async Await Description
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
async function asynchronousFunction() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve('Called!') | |
}, 3000) | |
}) | |
} | |
async function main() { | |
console.log(await asynchronousFunction()) | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment