Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

promise.all vs promise.allsettled

Promise.all()
/*will reject as soon as one of the Promises in the array rejects.*/
Promise.allSettled()
/*
1-will never reject, it will resolve once all Promises in the array
have either rejected or resolved.
2- DONT NEED CATCH BLOCK */
Source by dev.to #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+1 =