Skip to content

Instantly share code, notes, and snippets.

@inneroot
Last active June 16, 2020 13:27
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 inneroot/f8d0263335f23ff908c143bc4565c0d3 to your computer and use it in GitHub Desktop.
Save inneroot/f8d0263335f23ff908c143bc4565c0d3 to your computer and use it in GitHub Desktop.
return Result of concurrent tasks
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