LWC Bootcamp Day 12 | Promise | Async Await | Promise.all | Promise.any | Promise.race

preview_player
Показать описание

This Video Covers

👉🏼Promise
👉🏼 Async Await

#js #javascript #loops #collections #map #salesforce #lightning #development #lwc #jsoverview #lighting #salesforcelighting #salesforcetraining #lwcbasics #lwcadvanced #salesforcedeveloper #developer #ankitjain #techjourneywithankit #studysalesforce #lwc #aura #lightningwebcomponent #ankitjain #lwcbootcamp #arrowfunction #callbackfunction
Рекомендации по теме
Комментарии
Автор

Thanks for the wonderful video on Promise methods. Can you talk about a particular use case where we can make use of Promise.any() and Promise.race()? Thanks in advance!!!!

ChilllllMahBear_
Автор

Thanks Sir for the Great Expaination, but one thing I want to tell is at @ 24:58 I think you did a mistake on chaining the order of Promises it should be

generatePromise('1st call')
.then(()=> {
console.log("1st Promise Resolved Sucessfully");
generatePromise('2st call')
.then(()=> {
console.log("2nd Promise Resolved Sucessfully");
generatePromise()
.then(()=>{
console.log('The Peomise is Scessfull');
}).catch((error)=>{
console.log('The Peomise is Rejected --->', error)
})
})
});

emanishkumar
Автор

this is in context of promise.race() What if I have 5 promises out of those 5. 2 are rejected and 3 won the race(executed suceessfully) what will be the output ?( I will try right away after this comment but curios to hear from you)

manojbhujadi