In fact, because the results are always resolved with a Promise, async functions can be resolved as a group using Promise.all. You can see an example of async functions with their results joined with a Promise.all:
async function checkEngines(threshold = 0.9) { return Math.random() < threshold; } async function checkFlightPlan(threshold = 0.9) { return Math.random() < threshold; } async function checkNavigationSystem(threshold = 0.9) { return Math.random() < threshold; } Promise.all([ checkEngines(), checkFlightPlan(0.5), checkNavigationSystem(0.75) ]).then(function([enginesOk, flighPlanOk, navigationOk]) { if (enginesOk) { console.log('engines ready to go'); } else { console.error('engines not ready'); } if (flighPlanOk) { console.log('flight plan good to go'); } else { console.error('error found in flight plan'); } if (navigationOk) { console.log('navigation systems good to go'); } else { console.error('error found in navigation systems'); } })
The preceding code works as expected. The functions can even be called directly with an argument, without needing to wrap them in a call to Promise.resolve.