Forked from saiumesh535/asyncawaitwithouttrycatch.js
Created
February 15, 2018 19:59
-
-
Save sixpetrov/c50a74a68467407771de89040048b3dc to your computer and use it in GitHub Desktop.
async await without try catch
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 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