- Open your command-line application and navigate to your workspace.
- Create a new folder named 04-06-Promise-all-collect-concurrently.
- Create three functions, checkEngines, checkFlightPlan, and checkNavigationSystem that log a message when they start and return a Promise that resolves to true if a random number is higher than a threshold after some timeout:
function checkEngines() { console.log('checking engine'); return new Promise(function (resolve) { setTimeout(function() { console.log('engine check completed'); resolve(Math.random() < 0.9) }, 250) }); } function checkFlightPlan() { console.log('checking flight plan'); return new Promise(function (resolve) { setTimeout(function() { console.log('flight plan check completed'); ...