Skip to content

Instantly share code, notes, and snippets.

@saiumesh535
Last active February 19, 2020 18:23
Show Gist options
  • Save saiumesh535/0bc9577d08a31bfee2ad23294bf09c8c to your computer and use it in GitHub Desktop.
Save saiumesh535/0bc9577d08a31bfee2ad23294bf09c8c to your computer and use it in GitHub Desktop.
async await without try catch
async function getData(){
const a = await someFunction().catch((error)=>console.log(error));
const b = await someOtherFunction().catch((error)=>console.log(error));
if(a && b ) console.log("some result")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment