Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixpetrov/c50a74a68467407771de89040048b3dc to your computer and use it in GitHub Desktop.
Save sixpetrov/c50a74a68467407771de89040048b3dc 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