When working with the Promise
object in JavaScript, I noticed two methods, which were Promise.all()
and Promise.any()
.
Both of them take an iterable (such as an array
) as a parameter. However, I can't find what each method does differently.
After searching it on MDN, it was still hard to find a summary for the differences between the two methods.
In conclusion, what are the differences between Promise.all()
and Promise.any()
in JavaScript?
Note: This question is not related to this question. Instead of Promise.race()
, I am asking about Promise.all()
.