re: How to implement `Promise.all`? VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

Oops, another typo spotted! It should have been a let instead. Thanks for pointing it out.

I do think the counter is needed tho as we cannot guarantee the order of which the promises finish. So if the last promise doesn't finish the last, the results array will not be fully populated because of this:

const xs = [];
xs[6] = 3:
xs.length === 7; // true
code of conduct - report abuse