AAviNov 27, 2019
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 })...
HHenrique and 2 more commented















