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

re: Great post Jason! Just have a quick question, in your recursive method using promise, the order will be not be random if I understand it correctly?

No. The result would not be in random order. It should be in the order of the promises.


In each recursive call, we wait until head is resolved and then we move on to the remaining promises, is that correct? If so, is that how promise.all should work?

You are correct. But the other asynchronous executions will not be blocked.

If so, is that how promise.all should work?

I guess this depends on the implementation. I am not so sure how different browsers do it as they are implementation details that I don't really need to care.

code of conduct - report abuse