Promise is an special javascript object which use to do something in future. Like in real life when you commit to someone that's the commitment for the upcoming time. Same
9.8k
By Kate Angelou
Promise is an special javascript object which use to do something in future. Like in real life when you commit to someone that's the commitment for the upcoming time. Same as promises has two possibilities as resolved and rejected.
Today we will learn about it's one of method named as Promise.all().
What is promise.all()?
The Promise.all() method is actually a promise that takes an array of promises(an iterate) as an input. It returns a single Promise that resolves when all of the promises passed as an iterate. Which have resolved or when the iterate contains no promises. In simple way, if any of the passed-in promises reject, the Promise.all() method asynchronously rejects the value of the promise that already rejected, whether or not the other promises have resolved.