JavaScript Visualized - Promise Execution

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 525

  • @theavocoder
    @theavocoder  8 หลายเดือนก่อน +217

    ❤Hello again!! It's been a while since I uploaded to my own TH-cam channel haha.
    🔊 I'm aware that the audio is a bit low! Sorry about that, will keep this in mind in the future :)
    I have many ideas for upcoming videos, but let me know in the comments what you think I should cover next! 👇

    • @karthikm.1804
      @karthikm.1804 8 หลายเดือนก่อน +1

      "Yes! It's been a while, but I am excited for all the upcoming videos."

    • @markasena
      @markasena 8 หลายเดือนก่อน +2

      Volume is a bit low on my side. boost it up on your next one!

    • @EdwinMartin
      @EdwinMartin 8 หลายเดือนก่อน +3

      Hopefully not in 2029 😉

    • @mohithguptakorangi1766
      @mohithguptakorangi1766 8 หลายเดือนก่อน +3

      How did you create those slides of animations? Please let us know.

    • @hellomukit
      @hellomukit 7 หลายเดือนก่อน +4

      Great video. I would also like to know, how are those animations are made?

  •  8 หลายเดือนก่อน +207

    Probably the best explanation of Promise I've ever seen

  • @pablomendezjimenez2010
    @pablomendezjimenez2010 7 หลายเดือนก่อน +13

    Never seen a video with such clear drawings for explaining JavaScript promises and how they relate to the event driven nature of current JavaScript compilers.
    You've got a new subscriber!

  • @rodrigolj
    @rodrigolj 8 หลายเดือนก่อน +52

    I don't know if you want to go full time on this, but until then, I'm just so happy you decided to create content. It gives so much clarity on what JavaScript does, especially for people like me, who have aphantasia.

  • @pedroalmeida6728
    @pedroalmeida6728 7 หลายเดือนก่อน +73

    The visuals and animations are top notch, amazing work, keep it up!

  • @sunkittsui7957
    @sunkittsui7957 7 หลายเดือนก่อน +32

    This is the most well done and comprehensive video on JS Promises that I have seen so far!

  • @PloddingDream-px3fz
    @PloddingDream-px3fz 5 วันที่ผ่านมา

    This is a flawless presentation. I haven't found a single resource even mentioning the promise reaction record.

  • @dbsSensei
    @dbsSensei 8 หลายเดือนก่อน +113

    Finally, new video after five years :')

    • @CsAlchemy-eg6ch
      @CsAlchemy-eg6ch 8 หลายเดือนก่อน +3

      Been so long

    • @saiprashanth3618
      @saiprashanth3618 7 หลายเดือนก่อน +1

      But, worth the wait.

    • @codeChuck
      @codeChuck 7 หลายเดือนก่อน +1

      Totally worth it! Great quality content!

    • @dbsSensei
      @dbsSensei 7 หลายเดือนก่อน +1

      Totally agree

    • @CsAlchemy-eg6ch
      @CsAlchemy-eg6ch 7 หลายเดือนก่อน

      Totally agree

  • @RonnieDenzel
    @RonnieDenzel 11 วันที่ผ่านมา +1

    Just found a new channel to subscribe to,these explanations are a solid💯

  • @cisolarix
    @cisolarix 7 หลายเดือนก่อน +2

    Without your video, I had never even been close to fully understand how promise works under the hood.

  • @luxgertalot
    @luxgertalot 29 วันที่ผ่านมา

    I started programming (BASIC on my APPLE ][+) in 1983 and have been in IT professionally for 25 years and I think your videos are amazing. Your explanations and visualisations are probably the best I've seen on TH-cam!

  • @theavocoder
    @theavocoder  8 หลายเดือนก่อน +24

    💡Also just a little clarification since I simplified the chained thens, I should've made this more clear by adding the event loop animation here as well!
    The first promise constructor resolves, the first then handler is encountered, this handler is immediately added to the microtask queue. However, the callstack isn't empty at this point because there are more thens to handle. So it keeps creating Promise Reaction/Promise Object records for the subsequent thens and these are added to the fulfill reactions list, but they aren't fulfilled at this point since the first handler is still waiting on the microtask queue. Only when the callstack is empty would this resolve and add the next then's handler to the microtask queue.

    • @mohithguptakorangi1766
      @mohithguptakorangi1766 8 หลายเดือนก่อน +2

      How did you create those slides of animations? Please let us know.

    • @nikeshsingh3049
      @nikeshsingh3049 7 หลายเดือนก่อน

      How did you create slides and animations. Would be great help

  • @BennyTwinny
    @BennyTwinny หลายเดือนก่อน

    I paid many JavaScript courses on Udemy and none had content like Lydia. I just have to subscribe to this channel.

  • @kesavareddyd
    @kesavareddyd หลายเดือนก่อน

    it's the best video on promises, visualization will always make concept crystal clear and you nailed it.

  • @vagrawa1
    @vagrawa1 4 หลายเดือนก่อน +1

    Hello Lydia. Thanks for all the videos. I hope we have teachers like you everywhere. Watching your videos gives so deep understanding about the topics. Thanks you so much again!!!

  • @JohnBuildWebsites
    @JohnBuildWebsites 7 หลายเดือนก่อน +6

    One of the best explanations I've seen. I'm so glad to see in recent years far better communication of confusing or complex ideas in coding.
    As an older bearded autistic Linux fan myself, I can confidently say simple communication hasn't traditionally been one of my peer groups strengths 😂. So I am glad my daughter will have far better role models explaining these concepts if she chooses to go into software development.

  • @akashrajawat3676
    @akashrajawat3676 7 หลายเดือนก่อน

    Just WOW!!!
    I have seen dozens of videos on Event Loop, and it made sense to me because some of them does not explain complete event loop. There is a famous video which tells event loop is simply a Stack and a Queue, and which always confused me when working with callbacks or promises. Thankyou very much for the video and looking forward for topics like "Closure".

  • @KeshariPiyush24
    @KeshariPiyush24 หลายเดือนก่อน

    I have been working on JS for like 2.5 Years now, so far I worked only by doing "MONKEY SEE MONKEY DO" way, but now finally I have understood how promises actually works. Best explanation on earth.
    Watched multiple other tutorials but it was never clear not even close to what was explained in this video. Thanks a lot ma'ma.

  • @AMMullan
    @AMMullan 7 หลายเดือนก่อน

    Superbly explained - as someone who hasn't really done much JS for a while and wanting to get back into it these kind of clearly explained resources are so useful 👏⭐

  • @tobiashaefermann
    @tobiashaefermann 8 หลายเดือนก่อน +3

    Great video as usual! A tiny addition I would make is that the then handler implicitly creates a fulfilled Promise as shown in the video by Lydia if you return a plain value - but the more common case for chaining is that you explicitly return a Promise yourself which usually is pending at first.

  • @dipeshtamang4467
    @dipeshtamang4467 6 หลายเดือนก่อน +19

    Visualisation really makes any complex topic easier to understand. Awesome explanation, keep up the good work.

  • @singhgautam18
    @singhgautam18 หลายเดือนก่อน

    had to slowdown a video for the first time on yt instead of watching on 1.5x. Great work!

  • @burhanuddinkauka792
    @burhanuddinkauka792 6 หลายเดือนก่อน +2

    Please please continue this series this is so awesome ❤

  • @pandeyrochak
    @pandeyrochak หลายเดือนก่อน

    Found your channel from GreatFrontend. This is the best Promise explanation on the internet. The animations are top notch 🔥🔥

  • @kh0lis
    @kh0lis 7 หลายเดือนก่อน +2

    This video suddenly popup on my feed. Your explanation with visualization is outstanding. Hope you can continue with other topics. Thanks 👍

  • @alexandrsashin
    @alexandrsashin 8 หลายเดือนก่อน +3

    Your illustrations are eye-catching and easy to understand. I like this approach and want to say "Thank you" for such a great video!

  • @fanyinU
    @fanyinU 5 หลายเดือนก่อน +1

    Wow 🚀 This is the BEST explanation of promise concept I've ever seen. The visualization and your explanation work super well together 👍

  • @lakshminarayanareddypadart9807
    @lakshminarayanareddypadart9807 7 หลายเดือนก่อน

    Please make more videos like this. It makes my learning faster and easier.

  • @AntonKononov-u5n
    @AntonKononov-u5n หลายเดือนก่อน

    The best explanation I've ever seen! Thank you.

  • @A_Saban
    @A_Saban 7 หลายเดือนก่อน +2

    Well done! this visualization is the best I have ever seen for learning how the code works, plus your explanation is easy to understand kinda whish I had it when I learned promises

  • @arsamhashempour8156
    @arsamhashempour8156 5 หลายเดือนก่อน

    just 2 days ago I was thinking about lack of a visualized teaching in javaScript and today I found this channel it's great keep going and keep the level of your videos above I think developer community needs more people like you

  • @AngeloCarlotto
    @AngeloCarlotto 7 หลายเดือนก่อน +2

    The way you explain thing is just perfect form me, and the awareness of you saying “you understand OR how well I(your self) explained” means to me you are beyond of a heck of a person/professional. Good job.

  • @Athelian
    @Athelian 7 หลายเดือนก่อน +2

    I was blown away by your frontend masters course, please make more content like this and don't change a thing!

  • @muhammadusmanshaikh
    @muhammadusmanshaikh 3 หลายเดือนก่อน

    This type of explanation is the best. Please keep uploading.

  • @letmewatch.
    @letmewatch. 6 หลายเดือนก่อน

    The visualization here is crazy to a point, me- who's very slow to understand, understood every word you said. Please keep doing more of this. I've even subscribed!

  • @Bhanuprasad-r3n
    @Bhanuprasad-r3n หลายเดือนก่อน

    One of the best explanation about promises

  • @hsumudupriya
    @hsumudupriya 2 หลายเดือนก่อน

    You have given an excellent explanation with great visualisations. Thank you!

  • @PostigIT
    @PostigIT 7 หลายเดือนก่อน

    Asynchronous programming is one of the most difficult topics to learn for beginners, because it is difficult to visualize in your head the coherent work of the stack, queues, event loop and web API. Thank you for such a clear explanation of how Promises work. I'm waiting for your new videos. Greetings from Russia! 🕊

  • @nate_codes
    @nate_codes 8 หลายเดือนก่อน +4

    This was INSANELY well done and highly educational. As someone who felt like I never fully grokked promises, after 4mins of watching a vid I now feel confident in how they fundamentally work. The visuals were amazing, progressive code snippets were perfect, and the script was tight and educational. I love that you basically made a clif notes video for a chunk of EXMA-262!! Insta sub! 👏

    • @nate_codes
      @nate_codes 8 หลายเดือนก่อน

      EMCA-262… DYAC 🤦‍♂️

    • @lilichao9984
      @lilichao9984 7 หลายเดือนก่อน

      @@nate_codes ECMA?

  • @nope-zdvcz99
    @nope-zdvcz99 5 หลายเดือนก่อน

    probaly one of the best explanation for Promise, thank you so much for this video🙏

  • @novodip247
    @novodip247 8 หลายเดือนก่อน

    I have a frontend interview after 2 days and this popped up in my feed, thanks youtube, Great visualization of promise, really enjoyed how you explained how things work under the hood in Promise.

  • @heayyyyyyy11
    @heayyyyyyy11 7 หลายเดือนก่อน +1

    Finally someone could explained how this whole magic is working in the way I can understand. Thank you so much :D

  • @vikashnagar2114
    @vikashnagar2114 4 หลายเดือนก่อน

    i just love you , mam
    i never get that kind of quality, deep knowledge about js

  • @danielqolami
    @danielqolami 7 หลายเดือนก่อน +1

    This is the best explanation I've ever seen on "Promise" subject.
    thanks for the video.

  • @shivams417
    @shivams417 7 หลายเดือนก่อน

    Brilliant work!!, explained easily with story + visualizations, thanks Lydia. I hope u continue to make such Visualized videos for advanced concepts for key frontend techs such as JS, TS, ReactJS and NodeJS.

  • @libra.
    @libra. 7 หลายเดือนก่อน +1

    been waiting for 5 years, ‼️🗣️🗣️🗣️ legit firee🔥🔥🔥💯💯

  • @agormanco
    @agormanco 7 หลายเดือนก่อน

    Nicely done! I've working with Promises since 2012 or before, but I never understood the details until watching your video in prep for an interview. Thanks!

  • @julia-vialkova
    @julia-vialkova 6 หลายเดือนก่อน

    Lydia, thank you very much for explanation. Don't stop, keep making videos like this

  • @TheCodingSloth
    @TheCodingSloth 8 หลายเดือนก่อน +6

    wow amazing video Lydia! Really loved the high quality visuals and your teaching style. Keep it up!

  • @flavisff8040
    @flavisff8040 3 หลายเดือนก่อน +1

    it helped a lot to revise and clear some doubt, thanks for such good content, keep making for some more topic ❤❤

  • @BonBaisers
    @BonBaisers 8 หลายเดือนก่อน +1

    Love it, strait to the point, useful infographics and efficient plan. I think the format is great. Details on "small" topics give the opportunity to beginners understand concepts and experimented people will always learn 1 or 2 things.

  • @dustingarner4620
    @dustingarner4620 4 หลายเดือนก่อน

    This was so helpful, thank you so much for making this! The visuals were amazing.

  • @meowmerry5418
    @meowmerry5418 5 หลายเดือนก่อน

    Please continue more, your video makes me understand and it really help me to want to study more.

  • @l0upgarou
    @l0upgarou 7 หลายเดือนก่อน +1

    Lydia, I wish I could like and subscribe more than once. Love this format, please please make more videos like this.

  • @abhirajsinha3186
    @abhirajsinha3186 8 หลายเดือนก่อน

    Have been reading your Javascript Visualised series on Medium, you're really underrated. Thank you for making these, hope you continue! Really helpful for beginners

  • @mihirphadnis2
    @mihirphadnis2 5 หลายเดือนก่อน

    I am so glad this popped up in my timeline. Thank you for this great video!

  • @proplayeriguess
    @proplayeriguess 6 หลายเดือนก่อน

    this is the best explanation i have ever seen, simply awesome

  • @praisechinonso-s8d
    @praisechinonso-s8d 3 หลายเดือนก่อน +1

    Your channel is a gem

  • @josemarin359
    @josemarin359 7 หลายเดือนก่อน

    Really good video. Even though youtube is crowded with Language specific subjects, the quality of this video makes it special.
    What I don't see a lot in youtube (maybe you can take the challenge) is about programming developing flow and techniques. Once you master the language the big challenge is about the developing process flow. How to decompose a big problem. Where to start. When to be wary about coupling of functions and data structures, how to create functions that have only one responsibility, data structures, simplicity, scope of a function, top-down approach vs bottom-up approach. I think the format for the video could be to create a medium complex project (several videos) and stress good practices and what could have gone wrong, what are the internal thought process that recreated the flow.

  • @KuvitusAcadamy
    @KuvitusAcadamy 6 หลายเดือนก่อน

    Great tutorial! I really appreciate the clear explanations and visualizations you provide for JavaScript concepts. I think it would be awesome if you expanded your tutorials to cover other programming languages using the same visualization method. It could help learners understand different languages more easily and broaden their skillset. Keep up the excellent work!

  • @LukasSmith827
    @LukasSmith827 8 หลายเดือนก่อน

    learning through both visualization and text is so underrated. please keep these videos going!

  • @zardokar
    @zardokar 7 หลายเดือนก่อน

    I'm JS Developer and I like your animation for explanation. I hope you create the next videos. Cheer !!

  • @lucasviga12
    @lucasviga12 3 หลายเดือนก่อน +1

    an explanation about: call stack and memory heap, or prototypes chain will be cool. Thanks for the video.

  • @dylanpalmboom2971
    @dylanpalmboom2971 5 หลายเดือนก่อน

    Thanks for another amazing video! This cleared up many questions I had in my mind regarding asynchronous code ✨

  • @David-yx8ks
    @David-yx8ks 7 หลายเดือนก่อน

    Great video and one of the best illustrations of promises I’ve ever seen. Please continue making this type of content!

  • @jizhang2407
    @jizhang2407 7 หลายเดือนก่อน

    I love the visualization. Thank you. And, more, more, more...!

  • @אלעדר
    @אלעדר 7 หลายเดือนก่อน

    By far the best explanation of this topic I've even seen

  • @ilejovcevski79
    @ilejovcevski79 5 หลายเดือนก่อน

    This was extremely helpful, i hope you keep on making these!

  • @dmitrystril1748
    @dmitrystril1748 7 หลายเดือนก่อน

    Hey, it's good to see you on youtube, your visualizations got even better! 😀
    Thanks!
    💡Maybe execution contexts and closures would be good to cover next.

  • @TheUnknownFactor
    @TheUnknownFactor 7 หลายเดือนก่อน

    Incredible! I was playing-pausing-testing-playing-pausing as the video went on and ended up writing:
    function createHandler() {
    console.log('creating success handler');
    return () => console.log('.then Resolved!');
    }
    new Promise((resolve, reject) => {
    console.log('promise function body');
    queueMicrotask(() => console.log('microtask before resolve'));
    resolve();
    queueMicrotask(() => console.log('microtask after resolve'));
    }).then(createHandler());
    console.log('regular call stack');
    Before the last part of the video I expected ".then Resolved" to occur before "microtask after resolve"; but the last bit about then-handler not being pushed to the microtask queue until the then actually runs kind of makes sense. I was assuming that the resolve itself would push the microtask.

  • @mohammadsubhan1318
    @mohammadsubhan1318 4 หลายเดือนก่อน

    You really explained it very well 🎉❤ Hats off

  • @punisher013
    @punisher013 หลายเดือนก่อน

    very high level of presentation, as usual - thanks :-)

  • @MihirMenon-c4u
    @MihirMenon-c4u 3 หลายเดือนก่อน

    Thanks for deep explanation, Lydia

  • @salehmohammednasseralobidi5880
    @salehmohammednasseralobidi5880 6 หลายเดือนก่อน +1

    What a wonderful explanation 😊😊

  • @WbAzmul
    @WbAzmul 8 หลายเดือนก่อน

    Thanks for uploading this video. Actually when I stated learning JS , I read your writing on MDN about " Promises & Async/Await" then I came to TH-cam if there is any video on this but it was not there. I got a bit disappointed. Now You upload this video. really happy for that. please make more video on JS.

  • @stianmaurstad
    @stianmaurstad 7 หลายเดือนก่อน

    Thank you Lydia, as a visual learner, these visuals makes it so much easier!

  • @MikeNugget
    @MikeNugget 8 หลายเดือนก่อน +1

    Wow, that infographics animation is absolutely amazing ❤

  • @AjinkyaBhushan
    @AjinkyaBhushan 7 หลายเดือนก่อน

    You are doing amazing. Keep posting videos. I understood about promises clearly

  • @_dp3po_881
    @_dp3po_881 7 หลายเดือนก่อน

    best explanation I've ever seen. well done.

  • @macmacmac740
    @macmacmac740 8 หลายเดือนก่อน

    Amazingly explained. Thank you very much.
    I am in between interviews and I am sure this video will help me explain and implement promise in most effective way. ❤

  • @ikshitchaudhari2529
    @ikshitchaudhari2529 8 หลายเดือนก่อน +2

    WOW, this is some really high quality content.
    Can definitely see your channel skyrocketing !
    Keep up !🔥

  • @g_pazzini
    @g_pazzini 7 หลายเดือนก่อน

    the visualizatiion is neatly created and helps a lot to understand the concept explained. great job!

  • @ИванРагозин-я8я
    @ИванРагозин-я8я 7 หลายเดือนก่อน

    I love you Lydia, make more videos like this, the views, likes are incredible.

  • @omak3313
    @omak3313 8 หลายเดือนก่อน +1

    Thank you, Lydia! Visual explanation with animation helps a lot in understanding!

  • @CrusaderMen
    @CrusaderMen 8 หลายเดือนก่อน +1

    Thank you
    Learning by visual is the best way to learn

  • @slackstation
    @slackstation 7 หลายเดือนก่อน

    Excellent video. The animations add so much to the understanding!

  • @harishraghavans3381
    @harishraghavans3381 หลายเดือนก่อน

    Love the way you explained

  • @adcstat689
    @adcstat689 4 หลายเดือนก่อน

    Best explanation, please keep up the good work 🤩

  • @anon5992
    @anon5992 6 หลายเดือนก่อน

    I'm so happy this video exists! I've seen many courses that cover this topic but this one has been the most complete the easiest to understand. please teach us more, can i ask for how heap works in javascript video

  • @maheshOffVlogs
    @maheshOffVlogs 7 หลายเดือนก่อน

    Hey welcome back after 1/2 decade 😍,nice explanation came back with cool video. Plz continue doing videos 🫶

  • @diegoorellana8947
    @diegoorellana8947 7 หลายเดือนก่อน

    please keep doing these deep and technical videos!
    Also, it would be nice if at the end of the video, you give some recommendations on resources to learn more about the topic being touched.

  • @nestorrente
    @nestorrente 7 หลายเดือนก่อน

    I've found this video quite interesting! I already had more or less a clear idea of how promises work, but honestly I didn't know the existence of the microtask queue (I thought all future tasks were added to the same queue). I'll share this video with the developers of my team so they can learn from you too 🙂 thanks for this!

  • @kdshare6765
    @kdshare6765 7 หลายเดือนก่อน

    Excellent, I am very glad to watch this high quality video ❤

  • @DevMe-f5v
    @DevMe-f5v 2 หลายเดือนก่อน

    I wont skip adds for you, thanks madam

  • @Serhat786
    @Serhat786 7 หลายเดือนก่อน

    Welcome back and try again and never give up. Happy to see.

  • @tahasin2321
    @tahasin2321 8 หลายเดือนก่อน

    Finally welcome back after five years with new video ❤❤❤

  •  7 หลายเดือนก่อน

    Great video and probably one of the best explanation of promises on the web. Thank you.

  • @theavocoder
    @theavocoder  7 หลายเดือนก่อน

    📝 Blog Post: www.lydiahallie.com/blog/promise-execution
    📚 ECMA spec: tc39.es/ecma262/#sec-promise-objects
    👩‍🏫 Check out my JavaScript Visualized Course on FrontendMasters! frontendmasters.com/courses/javascript-quiz/

  • @ankitsenjaliya1808
    @ankitsenjaliya1808 7 หลายเดือนก่อน

    This video is a master piece.Thanks for your detailed explanation.

  • @alessandroformica6824
    @alessandroformica6824 7 หลายเดือนก่อน

    Learning is fun this way! Looking forward to subscribing to one of your next courses ❤