At 33:57, when you tried to do -1 index value, it broke the code which should not have been the case. First of all, even if it breaks the code meaning throw an error, it will and should always go to catch block and does not show you unhandled in promise error message since you are handling using a .catch. Is the IDE you using super new or something and has not setup certain js features correctly?
32:10 In the real world example you have two .then's inside of the Promise's callback function. Why would they still work inside of the Promise? Does the catch() function already return a Promise?
At time stamp 13:46. The statement "The resolve right here is just a reference to the function passed into then" is incorrect I guess. Can anyone clarify? What I understood is -> resolve is a function different from the function inside the ".then". After resolve gets executed, function inside ".then" is executed. lets say, we have promise.all([promiseObject1, promiseObject2]).then((data) => console.log(data)). Here it logs array of resolved. This means resolve gets executed, after that the function inside ".then" is executed Optionally we can send any data in resolve which is then send to ".then" and ".then" takes that data to execute it.
29:10 A usecase for passing in onError in the .then() is to provide fallback data. For example, if fun1 rejects and then if the onError returns some data, then having fun1().then(fun2, onError).then(onSuccess) means that the onSuccess function will always receive some data, either fun1 resolves successfully and it's all good and well, or onError happens and that provides a fallback value so that onSuccess can always assume it has some data.
I come from a C/C++ and Python background, because of my current job I've been struggling with JS concepts, definitely these videos have helped me a lot, thanks for putting quality content available for everyone!
I’ve been watching videos for years trying to make sense of Promises, and while I got through it, I’ve always wanted to come back and really understand them. Your video turned the light bulb on for me. Wow! I had to tip you for the help! I appreciate it so much! Definitely subscribing!
This is not only coding tutorial rather its an ART!
I am a 15 year old learning front-end development and struggling with promises. After 3 days of exhaustion I found ur video and finally got the whole concept. Thank you for this masterpiece 😍😍
Why does youtube algorithm hide such gems from the millions who would have subscribed had they been recommended such videos❤ Would handsomely pay for such quality
Cannot believe I'm watching this for free, you are the goat
Been watching your shorts for a while, decided to hop into your channel and this is the first video I watched. Holy hell the quality of your videos is mind blowing. You put so much effort into edits and your explanation is very planned, with a set preordained path which makes the most sense. You've got a new sub.
I have watched the best vidoes of Kyle Simpson, Tyler McGinnis, Tony Alicea, colt Steele, Jim cooper, Aksay, Ania, Maximilian, Sasha, I can go on and on.... I spent A LOT of Money just to understand. I have watched ALL YOUR VIDEOS. I can assure you that this explanation got.YOUR EXPLANATION of SIMPLIFYING THE CODE before refactoring in simply the Best. Your tutorial is AMONGST THE BEST THREE for me. THANK YOU, THANK YOU, THANK YOU.
I'm so happy to be finding your channel I want to cry. Impeccable production. Clear examples. Perfect pacing - not too fast, not too sluggish. Detailed yet very follow-able explanation. Funny host. thank you thank you thank you.
3 days ago I wanted to watch just this video but the title made me look for the whole series, and I knew that to understand better I needed to watch the previous episodes, and OMG I'M GLAD I DID. I feel I have like a super knowledge now, EVERYTHING MAKES SENSE NOW!! I don't know how to express how grateful I am!! I'm so excited because you cleared all my doubts about promises and not just promises, now I understand Objects() way better! THANKS!! Waiting for your master class!!
i can tell you put a lot of passion and effort into your work bro its inspiring
What a charismatic person you are. Good Lord. I started the video knowing nothing about Promises and I am finishing it as an absolute pro. Thank you for going into detail.
As a lead engineer I have to say, these are by far the best tutorials for javascript on youtube. Fantastic for mentoring junior devs. It baffles me how this channel doesn't have more views!
There aren't many video's that are 30+ minutes worth rewatching, but this one certainly is. Nice video
I just wanted to leave a comment, thanks. Your videos are one of the best ones I have ever seen. It makes it so much easier to understand, and fun. You also seem to have a great empathy towards learners? and really understand their point of view, hence are able to produce great videos like this, which I think is an amazing pov to have. Thank you. I will definitely be sticking around.
@ColorCode-io