Skip to content

Instantly share code, notes, and snippets.

@gaurav21r
Created August 22, 2017 08:04
Show Gist options
  • Save gaurav21r/61bd738156f4207b866e00a617127e75 to your computer and use it in GitHub Desktop.
Save gaurav21r/61bd738156f4207b866e00a617127e75 to your computer and use it in GitHub Desktop.
Async Await Description
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