Skip to content

Instantly share code, notes, and snippets.

View gaurav21r's full-sized avatar

Gaurav Ramanan gaurav21r

  • Ramanan Corporation
  • New Delhi
View GitHub Profile
@gaurav21r
gaurav21r / testasyncpromise.js
Created August 22, 2017 08:04
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())