Javascript – Await multiple promises in parallel, but return early if they take too long, once first 2 have resolved
I'm working with promises in JavaScript. I need to call a promise that returns a number 3 times. These conditions must be met: The promises must be run in parallel, not one after the other. If all the promises resolve…