Correction: 05:42 instead of if(index === promiseArray.length - 1), we should maintain a count counter, and add +1 to it as we receive the response. Then we should check if count === promiseArray.length
Get code from Medium blog:
/ implementing-promise-all-polyfill-promise-...
This video explains the working in Promise.race and how to implement its polyfill.
This video is part of video series on Promises. Implementing promise.race polyfill is one of the frequently asked interview questions
Follow me on
Instagram: / awwfrontend
Twitter: / frontendaww
Medium: / awwfrontend