Btw if you're in a hurry you can just fast-forward to 10:52 haha! I use Apple Keynote for everything. 💡Just a heads up: I explain these concepts in a way that personally helped me conceptualize the processing order. E.g. the event loop doesn't directly "prioritize" the microtask queue, rather they're just processed and completed before the event loop continues to the next task. One iteration of the event loop is executing a single task, processing all available microtasks, and then updating the rendering of the page if needed (that's not covered in this video, might be another video, things like requestAnimationFrame). However, within your code, you'll get the sense that the microtasks are "prioritized" over the task queue-based parts.
If anyone had a question in the Challenge section as to why console.log(1) didn't execute immediately, even though it was in the Microtask Queue and the Call Stack was empty, read on. All the code on the left is a script and can be represented as an anonymous function. At the very beginning of the "Challenge" section in the Call Stack, there should have been an "anonymous" block. This block starts executing (the script is being executed), and then everything is the same as in the video, except that the "anonymous" block is always at the bottom of the Call Stack. The "anonymous" block disappears from the Call Stack after console.log(5) is executed, because it is the last operation in the script. And so when the "anonymous" block disappears from the Call Stack, Microtask Queue and Task Queue processing starts (10:04). Great video!
Yep, the anonymous block is referred to as Global Execution Context
6 місяців тому+3
Thanks! Because of this the explanation in the video seemed a bit conflicting with this example. Now it seems like an important piece (for understanding) has been omitted from the visualization. Would have been great to include this in the video. However the explainer and visualization are outstanding even without this minor miss (though it can cause some confusion).
I've been in software development for 16 years. This video is outstanding. Probably one of the best I've ever seen for JavaScript. Lydia, I want to encourage you to keep doing these if you desire. This visual, animated approach combined with your ability to teach is a home run. Thank you so much for doing this. I am now subscribed.
Same here. It is really hard to find _good_ tutorials that bring both a good overwiew _and_ good examples for the details. And then presented with really appealing diagrams, even dynamic ones!
@Lydia Hallie Are you kidding? This level of detail, every animation, every transition, the highlighting (and temporarily hiding unimportant components) is just so good. Very well done, love it.
Oh god. I am a senior dev revisiting some of the js concepts for an interview, and I gotta say this is the best explanation of the javascript runtime I have ever seen.
I think I don't want to understand any other concept if it's not explained this way. This is GOLD! This was so satisfying for my brain for some reason, this ACTUALLY MADE SENSE.
10 / 10 quality. The explanation of the different queues helped clear up confusion I had in the background of how asynchronous tasks work underneath the hood in the context of Javascript. Even with a bachelor's degree in computer science it was still a pretty head scratching concept thinking "how does the engine know what is I/O blocking and what is not? How does it handle that?". I would always hear "oh its just on the event loop! Its just on the event loop!" but I'd be like "all these diagrams suggest the blocking and non-blocking are on the same queue". I had no idea about the microtask queue and that is where fetch's then calls are appended to. Also I can't help but look at the word "event loop" and just think of Froot Loops.
If you don't understand this here, you need to repeat it over and over, because this is by far the best explanation on the entire internet for this topic.
it is very very rare to have material like this presented in such a visual and engaging way .. animation is hardly ever used in js tutorials. Visualization of these concepts is so important for the visual learners out there. THANK YOU. instantly subscribed.
Just wow. I'm a beginner, and I came from The Odin Project. This is the best video tutorial I've seen so far for such a complex topic. The visualization is just perfect. Some senior devs in comments said that they finally understood this topic thanks to your video after years working in this industry and I've got it already in the learning process and it feels so good. Thank you.
I love your explanation, animations, challenges, how you explain the results, the fact that you make recaps at the end…. This channel and you are just perfect!
Very smooth the whole explanation. I would recommend all JavaScript developers to watch twice at minimum to understand the flow. Thank you Lydia for your efforts for making such an in-depth video.
Top tier presentation, this is easily one of the best visualizations I've seen on UA-cam. You clearly have excellent teaching and communication skills. I know you are focusing your content on JavaScript but if you were ever interested in giving us an overview of some of your presentation techniques in Apple Keynote, I think many viewers could greatly benefit from it. Keep up the awesome content! I can't wait to see what videos you have in store for this channel.
When i work with my teammates, I always try drawing or make visualization/animation to explain to them. Your video is a gold standard of it and encouraged us a lot for keeping explaining everything crystal clear by this way.
THIS IS THE BEST EXPLANATION OF EVENT LOOP! Seriously, I've already worked with js for 3 years, seen several videos about it, and never it has been so clear (actually the reason why I opened this video) Thank you for your work!❤
This is so good??? I have watched 40-minute-long videos on Event loop and could not get an idea of what goes on in the background, the efforts it must've taken to create something so good! Commendable work ma'am. This is the best explanation out there for the event loop!
Just jamming here... being C++ developer for 30 years, reading all these comments about seniors and juniors...I wonder: Guys have you ever read a text book about your profession? Nice video btw!
The world cheers for splashy things and call themselves a "coder" and then cry that AI will take the job. The traditional way is long gone where we used to read the books, make our own interpretation and test our understanding by hands-on coding. But, a good explanation in the video. no doubt.
I'm a visual learner, and I've been software development for more than a decade. This is the first time I felt engaged and easy to understand how JS works. very informative. Please keep it rolling, I'm hooked, and I don't want this to stop.
I programed in C/C++, now I'm starting with JavaScript and Django framework. It wasn't clear for me how Javascript execution worked with just 1 single thread. This visualization is perfect, helped me a lot.thanks.
I immediately subscribed after watching this video , So awesome explanation and made my day . That DOPAMINE hit after understanding the concept which gave you headache . Thank you so much ❤
Amazing video ! I've been a NodeJS developer for 8 years now and I didn't know this in details ! Awesome ! Its also great to see new faces in the IT video ecosystem, specially women who are under represented. And the animations are awesome ! Thank you for the work
I got stuck understanding this flow of things happening behind the scenes. But now I understand why and how they are happening. Thank you for the wonderful explanation. Keep Doing!
This is FANTASTIC! Thank you! I've been looking for tutorials like this for 20 years, since I first started learning JavaScript. I love it! Subscribed!
I am a project manager with 5 years experience in fullstack development inside a University and this is the single best video about the insides of JS I've had the pleasure of watching. Thx
This video is way better than watching my favorite golden buzzer artist for the first time. Off the charts explanation. This video has just made history. Thank you so much. I had gone through a similar tutorial, yet, this one is so easy to follow.
God bless you Lydia. Hands down the most important and enlightening JavaScript tutorial on the UA-cam that every serious JavaScript developer needs. God
This is excellent work, Lydia! Your visualization of the event loop definitely can help millions of JS engineers understand it better. Huge impact, congratulations!
I have dived into the javascript worlds nearly 2 years and read about event loop from different topics and blogs but after sometimes I did not remember anything but I don't think I will anymore. Thanks for this. Please, keep doing this.
A really great video. This usually takes full chapter in book & 2 classes to fully understand event loop. This video beautifully condenses whole info in 12 mins. The presentation is simply amazing with amazing graphics. Thank You 👏👏👏
I have no words. I’ve never seen a coding, programming or any kind of software dev video this well laid out! Your visuals and your ability to “talk shop” are both incredible. If you sell a course, I’d buy it immediately.
I saw many tutorials about event loops, but I didn't understand anything. However, when I saw your tutorial, I understood everything about the event loop
Thanks for a great explanation! After 15 years I never once had a need for knowing about this the difference between the queues. But now with all the tech-interviews it seems like this is essential knowledge.
You've broken this down so simply that I'm surprised this isn't the standard model for teaching this. I don't deal with js a ton so you've helped explain behaviors I had witnessed but never fully understood, thank you!
4 months ago, I learned event loop from your dev.to post titled JavaScript Visualized: Event Loop - which is the best visualised minimalistic explanation I have come across, and then to refresh it, I watched this video you recently posted. Thank you Lydia Hallie.
What a brilliant girl! I could only imagine the process of coming up with visuals for this video, they are amazingly simple to understand! And they are also in sync with your commentary! Wow! 🧡
5:11 important moment here: setTimeout is not just magically gets push onto task queue, but on every event loop run there is check if we need to run some operations (check if set timeout delay is over, if callback was triggered etc.), therefore it's not guaranteed that set timeout callback will get executed exactly in n seconds, but it is guaranteed that it will execute *after* 200ms
i often use "feeling" to say "maybe this work like this", finally your video with the visualization make me say "ahh so that how its work". Amazing Video
It is insane how much information you you were able to convey in one short video, I knew async tasks were pushed off to be filled later but I had no mental model how that worked until now.
I think this is the best event loop explanation in the internet. You have described each and every point in such detailed way, making this topic feel so simple to understand. The animation is also made with such detail, making life easier.
This was absolutely amazing!! The way you broke down callbacks from methods, visuals to see what’s happening. Best of all a challenge to really help drive the subject home, best way to improve learning. I can’t wait for more to come from you and THANK YOU!
i dont usually comment but this was the best explaination of event loop... but to make things more clear you should also mention that microtask takes priority like if a task is in microtask queue it will immediatedly run after the current task in call stack but before the next task is processed in call stack.. Btw thank you for this lovely video.
Btw if you're in a hurry you can just fast-forward to 10:52 haha! I use Apple Keynote for everything.
💡Just a heads up: I explain these concepts in a way that personally helped me conceptualize the processing order.
E.g. the event loop doesn't directly "prioritize" the microtask queue, rather they're just processed and completed before the event loop continues to the next task. One iteration of the event loop is executing a single task, processing all available microtasks, and then updating the rendering of the page if needed (that's not covered in this video, might be another video, things like requestAnimationFrame). However, within your code, you'll get the sense that the microtasks are "prioritized" over the task queue-based parts.
Gotta love you for respecting our time.
From where did you learn?
Can you please extend this more to explain NodeJS runtime 🙏
Those slides are wonderful, it’s still a mystery to me how they are so good. Skills.
Thank you for doing this. I love the visuals you made here!
I have been programming for 15 years and I don't think I have seen information presented so succinctly in that span. Thank you so much for this.
100%
Absolutely 🤟
I agree completely. 15 years myself.
or you are just flatered becuase she is a programmer and a girl😁
Same. 12 years. These visualizations are so satisfying and to the point.
This should be a gold standard for all programming tutorials on YT. Really awesome
Actually the OG is this talk ua-cam.com/video/8aGhZQkoFbQ/v-deo.html
i think thousands of senior developers finally understood it today.
🤯
fake senior developers. No theory , not a real dev!
Knowing the todays reality, you wanted to say "junior" developers ? : )
@@KAIDO-mi1tr haha
now adays, senior and junior have similar salary, so whats the difference
The hardest part of explaining ANYTHING is coming up with visuals that help. You crushed it with this. This is brilliant, truly.
Where has this channel been all my life?
Exactly I was thinking the same 😂
In the future obviously. 😂
Same here❤❤❤❤❤
Exactly!!
philip roberts presentation video about event loop is the father of all event loop videos. everyone should see that video!!
If anyone had a question in the Challenge section as to why console.log(1) didn't execute immediately, even though it was in the Microtask Queue and the Call Stack was empty, read on.
All the code on the left is a script and can be represented as an anonymous function. At the very beginning of the "Challenge" section in the Call Stack, there should have been an "anonymous" block. This block starts executing (the script is being executed), and then everything is the same as in the video, except that the "anonymous" block is always at the bottom of the Call Stack. The "anonymous" block disappears from the Call Stack after console.log(5) is executed, because it is the last operation in the script.
And so when the "anonymous" block disappears from the Call Stack, Microtask Queue and Task Queue processing starts (10:04).
Great video!
Thank you. Absolutely wondered this.
Yep, the anonymous block is referred to as Global Execution Context
Thanks! Because of this the explanation in the video seemed a bit conflicting with this example. Now it seems like an important piece (for understanding) has been omitted from the visualization. Would have been great to include this in the video. However the explainer and visualization are outstanding even without this minor miss (though it can cause some confusion).
I've been in software development for 16 years. This video is outstanding. Probably one of the best I've ever seen for JavaScript.
Lydia, I want to encourage you to keep doing these if you desire. This visual, animated approach combined with your ability to teach is a home run.
Thank you so much for doing this. I am now subscribed.
9 years ago was this video... her video seems a rip-off
ua-cam.com/video/8aGhZQkoFbQ/v-deo.html&ab_channel=JSConf
I can only agree. Especially for this topic, it was hard to find such an amazing explanation. You really helped me out. Thank you,
ditto
You should really also credit the original creator of visualized event loop
ua-cam.com/video/8aGhZQkoFbQ/v-deo.html
Same here. It is really hard to find _good_ tutorials that bring both a good overwiew _and_ good examples for the details. And then presented with really appealing diagrams, even dynamic ones!
Okay ma'am, I noticed you only have 3 videos on your channel. Don't stop until you have at least a 20 video playlist on your channel. This is gold.
@Lydia Hallie Are you kidding? This level of detail, every animation, every transition, the highlighting (and temporarily hiding unimportant components) is just so good.
Very well done, love it.
She was pretty serious about what she was teaching
Oh god. I am a senior dev revisiting some of the js concepts for an interview, and I gotta say this is the best explanation of the javascript runtime I have ever seen.
Lydia, your teaching style is the best I've seen. Please continue to educate us.
I think I don't want to understand any other concept if it's not explained this way. This is GOLD! This was so satisfying for my brain for some reason, this ACTUALLY MADE SENSE.
10 / 10 quality. The explanation of the different queues helped clear up confusion I had in the background of how asynchronous tasks work underneath the hood in the context of Javascript. Even with a bachelor's degree in computer science it was still a pretty head scratching concept thinking "how does the engine know what is I/O blocking and what is not? How does it handle that?". I would always hear "oh its just on the event loop! Its just on the event loop!" but I'd be like "all these diagrams suggest the blocking and non-blocking are on the same queue". I had no idea about the microtask queue and that is where fetch's then calls are appended to.
Also I can't help but look at the word "event loop" and just think of Froot Loops.
If you don't understand this here, you need to repeat it over and over, because this is by far the best explanation on the entire internet for this topic.
it is very very rare to have material like this presented in such a visual and engaging way .. animation is hardly ever used in js tutorials. Visualization of these concepts is so important for the visual learners out there. THANK YOU.
instantly subscribed.
I can't thank you @theavocoder enough for clarifying the most important detail of the Event Loop. I wish I could give 100 likes
The visualization is outstanding, providing one of the clearest and most informative explanations I've come across.
Just wow. I'm a beginner, and I came from The Odin Project. This is the best video tutorial I've seen so far for such a complex topic. The visualization is just perfect. Some senior devs in comments said that they finally understood this topic thanks to your video after years working in this industry and I've got it already in the learning process and it feels so good. Thank you.
wow the visualization is awesome. The colours, gradients, design and animation. Its perfect down to the tiny details.
was just about to say the same - those are some awesome visualizations
I love your explanation, animations, challenges, how you explain the results, the fact that you make recaps at the end…. This channel and you are just perfect!
I'm a web programmer for 15+ years now and I'm stunned how well made this explanation is. really Amazing! Subscribed right away!
I think, even Google & UA-cam Developers really enjoy seeing this explanation, very nice and neat.
💯
Finally the youtube algorithm blessed me with this channel 😭
The sign of mastery is being able to simply explain a complicated concept. This preso is a thing of beauty... and mastery!
Very smooth the whole explanation.
I would recommend all JavaScript developers to watch twice at minimum to understand the flow.
Thank you Lydia for your efforts for making such an in-depth video.
Top tier presentation, this is easily one of the best visualizations I've seen on UA-cam. You clearly have excellent teaching and communication skills. I know you are focusing your content on JavaScript but if you were ever interested in giving us an overview of some of your presentation techniques in Apple Keynote, I think many viewers could greatly benefit from it.
Keep up the awesome content! I can't wait to see what videos you have in store for this channel.
When i work with my teammates, I always try drawing or make visualization/animation to explain to them. Your video is a gold standard of it and encouraged us a lot for keeping explaining everything crystal clear by this way.
This video should receive the Oscar for best animation
THIS IS THE BEST EXPLANATION OF EVENT LOOP!
Seriously, I've already worked with js for 3 years, seen several videos about it, and never it has been so clear (actually the reason why I opened this video)
Thank you for your work!❤
Thank you.
This is the best explanation I've seen.
This visualization really helped me understanding how asynchronous tasks work in JavaScript, one of the best learning materials I've met online.
Hands down, the best event loop explanation ever!
That was one of the most well edited tutorials i've seen, congrats!
I finally understand Event Loop after 1 year writing JS.
Don't worry, many devs still don't understand it after 10 years of writing JS.
I thought I did… until today😅
No you do not 😂
huh do you need to understand it? coding js/ts for 3 years now
Then you're a shit developer tbh
This is so good??? I have watched 40-minute-long videos on Event loop and could not get an idea of what goes on in the background, the efforts it must've taken to create something so good! Commendable work ma'am. This is the best explanation out there for the event loop!
This is the best explanation of the event loop I've ever seen.
This is one of the best front end videos I've watched in my entire front end career! Thank you!
This presentation is a pinnacle of visual communication. We are dealing here with a highly organized mind.
Thank you for making this video!. It would be awesome to see a video about the making of these animations
This is the type of visualization that coding vids need
it reminds me of debuggers we used to have in the late 80ies
best way I've ever seen anyone explain anything in my entire life.
I'm speechless!
Just jamming here... being C++ developer for 30 years, reading all these comments about seniors and juniors...I wonder: Guys have you ever read a text book about your profession?
Nice video btw!
The world cheers for splashy things and call themselves a "coder" and then cry that AI will take the job. The traditional way is long gone where we used to read the books, make our own interpretation and test our understanding by hands-on coding.
But, a good explanation in the video. no doubt.
it's like ADHD in programming context; new crop of developers needs abstraction & libraries for everything.
I'm a visual learner, and I've been software development for more than a decade. This is the first time I felt engaged and easy to understand how JS works. very informative. Please keep it rolling, I'm hooked, and I don't want this to stop.
Fucking hell Lydia, this is incredible
Ah thank you Matt! 🙏
This explanation is worth a thousand times compared to any conf. talk! HATS off to you Lydia!❤
I programed in C/C++, now I'm starting with JavaScript and Django framework. It wasn't clear for me how Javascript execution worked with just 1 single thread. This visualization is perfect, helped me a lot.thanks.
Few months later I will be watching the 500th video on this channel and by that time this channel will be a gem for developers.🙌🙌
This lady right here has put some incredible hard work in making this video.
I immediately subscribed after watching this video , So awesome explanation and made my day . That DOPAMINE hit after understanding the concept which gave you headache . Thank you so much ❤
Amazing video ! I've been a NodeJS developer for 8 years now and I didn't know this in details ! Awesome !
Its also great to see new faces in the IT video ecosystem, specially women who are under represented.
And the animations are awesome !
Thank you for the work
I moved from backend to frontend a couple of months ago and Lydia just saved my brain ❤
I got stuck understanding this flow of things happening behind the scenes. But now I understand why and how they are happening. Thank you for the wonderful explanation. Keep Doing!
This is FANTASTIC! Thank you! I've been looking for tutorials like this for 20 years, since I first started learning JavaScript. I love it! Subscribed!
I am a project manager with 5 years experience in fullstack development inside a University and this is the single best video about the insides of JS I've had the pleasure of watching. Thx
this is absolute CINEMA of computer science, thank you a lot Lydia
This channel is such a gem. I’ve never had a clearer explanation of event loop until now. Thank you and you’ve got a new subscriber.
After a long time, now I understand how JavaScript works behind the scenes. Thank you so much for this great job
This was actually very comprehensible. I was expecting this to be very convoluted but you made it very easy to understand!
This video is way better than watching my favorite golden buzzer artist for the first time. Off the charts explanation. This video has just made history. Thank you so much. I had gone through a similar tutorial, yet, this one is so easy to follow.
I'm gonna watch all of your videos because this clear visual representation totally fits how my brain works. Thank you :D
God bless you Lydia. Hands down the most important and enlightening JavaScript tutorial on the UA-cam that every serious JavaScript developer needs. God
This is excellent work, Lydia! Your visualization of the event loop definitely can help millions of JS engineers understand it better. Huge impact, congratulations!
I Just can say you explain the whole JavaScript for me in Just 12 minutes , Thank you so much buddy your way of explanation is amazing ❤
Whoa, I'm so happy that this channel exists. The visuals help SO MUCH with understanding all the JS flow!
I have dived into the javascript worlds nearly 2 years and read about event loop from different topics and blogs but after sometimes I did not remember anything but I don't think I will anymore. Thanks for this. Please, keep doing this.
A really great video. This usually takes full chapter in book & 2 classes to fully understand event loop. This video beautifully condenses whole info in 12 mins. The presentation is simply amazing with amazing graphics. Thank You 👏👏👏
this single video has taught me more about js under the hood then months of watching other videos
I have no words. I’ve never seen a coding, programming or any kind of software dev video this well laid out! Your visuals and your ability to “talk shop” are both incredible. If you sell a course, I’d buy it immediately.
I saw many tutorials about event loops, but I didn't understand anything. However, when I saw your tutorial, I understood everything about the event loop
The way you're explaining things is absolutely exciting! ✨
Thank you so much!
The best explanation and lesson I have ever seen. Visualisation is extremely amazing. Your explanation and sound is very clear.
Thanks for a great explanation! After 15 years I never once had a need for knowing about this the difference between the queues. But now with all the tech-interviews it seems like this is essential knowledge.
First time on UA-cam, I finally found someone who teaches like my class teacher
Bravo! As a fellow senior dev I'm extremely impressed by the level of detail and explanation.
You've broken this down so simply that I'm surprised this isn't the standard model for teaching this. I don't deal with js a ton so you've helped explain behaviors I had witnessed but never fully understood, thank you!
4 months ago, I learned event loop from your dev.to post titled JavaScript Visualized: Event Loop - which is the best visualised minimalistic explanation I have come across, and then to refresh it, I watched this video you recently posted.
Thank you Lydia Hallie.
Finally on UA-cam!! Welcome Lydia, it is a privilege to have your content here for free 🙌
I've never learnt so much about something I've used for hours and hours in 12 minutes. Thanks a lot!
The best visualization I have seen on JavaScript's Event loop. Thanks Lydia
Thanks for making a video that shows "How a language works" rather than "How to work with the language"
The way of presenting the info. is amazing.
What a brilliant girl! I could only imagine the process of coming up with visuals for this video, they are amazingly simple to understand! And they are also in sync with your commentary! Wow! 🧡
Man I wish I had this kind of style of teaching when I was first learning. So many people learn much more efficiently like this. Great job. Subbing
I initially watched this just for a recap, but the concept was so clear. It was great to see.
The first time I finally understand what microtasks are! Thank you!
Damn! Why did I miss this channel so long? This is what exactly I'm waiting for. Insane visuals.All the very Best.Subscribed😍
5:11 important moment here: setTimeout is not just magically gets push onto task queue, but on every event loop run there is check if we need to run some operations (check if set timeout delay is over, if callback was triggered etc.), therefore it's not guaranteed that set timeout callback will get executed exactly in n seconds, but it is guaranteed that it will execute *after* 200ms
While JavaScript remains an atrocious language, I enjoy the way you present and explain these ideas.
i often use "feeling" to say "maybe this work like this", finally your video with the visualization make me say "ahh so that how its work". Amazing Video
Been doing javascript for over a decade, and this was the coolest explanation I've ever seen!
The amount of detail into making this presentation is phenomenal! ✨👏
It is insane how much information you you were able to convey in one short video, I knew async tasks were pushed off to be filled later but I had no mental model how that worked until now.
can not be simpler and more elegant way of showing the concepts, thanks for the lessons.
I think this is the best event loop explanation in the internet. You have described each and every point in such detailed way, making this topic feel so simple to understand. The animation is also made with such detail, making life easier.
Best visuals I've ever seen on programming UA-cam! 🌹💯
(I was focused on the bottom right corner)
How lucky am I to have found this video! So concise and crisp. You just earned a subscriber.
This was absolutely amazing!! The way you broke down callbacks from methods, visuals to see what’s happening. Best of all a challenge to really help drive the subject home, best way to improve learning. I can’t wait for more to come from you and THANK YOU!
Best visual explanation about javascript execution on UA-cam. Thank you so much. Keep up the good work
i dont usually comment but this was the best explaination of event loop...
but to make things more clear you should also mention that microtask takes priority like if a task is in microtask queue it will immediatedly run after the current task in call stack but before the next task is processed in call stack..
Btw thank you for this lovely video.