Skip to content

Instantly share code, notes, and snippets.

Avatar

Gaurav Ramanan gaurav21r

  • Ramanan Corporation
  • New Delhi
View GitHub Profile
@gaurav21r
gaurav21r / testasyncpromise.js
Created Aug 22, 2017
Async Await Description
View testasyncpromise.js
async function asynchronousFunction() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('Called!')
}, 3000)
})
}
async function main() {
console.log(await asynchronousFunction())