Last active
June 16, 2020 13:27
-
-
Save inneroot/f8d0263335f23ff908c143bc4565c0d3 to your computer and use it in GitHub Desktop.
return Result of concurrent tasks
This file contains hidden or 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
const returnPromeseAll = async () => { | |
try{ | |
const a = getPromise1() | |
const b = getPromise2() | |
const concurrentResult = await Promise.all([a, b]) | |
} | |
catch(err) { | |
throw err | |
} | |
return concurrentResult | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment