Created
July 1, 2020 11:06
-
-
Save velotiotech/62039fc18c379459d1d0be08177a1043 to your computer and use it in GitHub Desktop.
NodeJS Async-Await Example
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 fooBarBaz(arg) { | |
try { | |
const fooResponse = await foo(arg+1); | |
const barResponse = await bar(arg+2); | |
const bazResponse = await baz(arg+3); | |
return bazResponse; | |
} catch (error) { | |
return Error(error); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment