How will you return the promise which will resolve earlier than others in an array of promises and cancel others which are pending?
Please find the code below: const cacheSourceA = new Promise((resolve, reject) => { setTimeout(() => resolve({ someValue: 101 }), 1500); }); const cacheSourceB = new Promise((resolve, reject) => { setTimeout(() => resolve({ someValue: 100 })...