Promise.all const data = Promise.race([promise1,...]) // iterable object You can extract promise resolved values using either .then syntax:- data.then((values) => {
values; // [resultOfPromise1, resultOfPromise2, ...]
}).catch(error => {
console.log(error)
} or async/await: try{
const result = await data;
console.log(result); //[resultPromise1, resultPromise2, ...]
} catch (error => {
console.log(error);
}