JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue

  Рет қаралды 227,421

Lydia Hallie

Lydia Hallie

Күн бұрын

Learn how the browser event loop, task queue, microtask queue, and Web APIs work together to enable non-blocking, asynchronous JavaScript.
- / lydiahallie
- buymeacoffee.com/lydiahallie
- / lydiahallie
- / lydia-hallie
- / theavocoder
Timestamps:
0:00 Intro
0:32 Call Stack
1:18 Single-threaded Problem
2:01 Web APIs
2:47 Callback-based APIs
4:04 Task Queue
4:39 setTimeout
6:22 Microtask Queue
8:40 Promisifying Callbacks
8:57 Challenge
10:52 Recap
11:58 Outro

Пікірлер: 852
@theavocoder
@theavocoder Ай бұрын
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.
@sadatarefinrafat
@sadatarefinrafat Ай бұрын
Gotta love you for respecting our time.
@swaminathbera6407
@swaminathbera6407 Ай бұрын
From where did you learn?
@sourabhjana1278
@sourabhjana1278 Ай бұрын
Can you please extend this more to explain NodeJS runtime 🙏
@inowatchvideos
@inowatchvideos Ай бұрын
Those slides are wonderful, it’s still a mystery to me how they are so good. Skills.
@joshuafontiveros7877
@joshuafontiveros7877 Ай бұрын
Thank you for doing this. I love the visuals you made here!
@bilalarain4632
@bilalarain4632 13 күн бұрын
i think thousands of senior developers finally understood it today.
@DasBeatz
@DasBeatz 7 күн бұрын
🤯
@scryptum
@scryptum 4 күн бұрын
fake senior developers. No theory , not a real dev!
@KAIDO-mi1tr
@KAIDO-mi1tr 3 күн бұрын
Knowing the todays reality, you wanted to say "junior" developers ? : )
@bilalarain4632
@bilalarain4632 3 күн бұрын
@@KAIDO-mi1tr haha
@carltongordon
@carltongordon Ай бұрын
Where has this channel been all my life?
@pawanpulami6091
@pawanpulami6091 Ай бұрын
Exactly I was thinking the same 😂
@peacemurder3778
@peacemurder3778 Ай бұрын
In the future obviously. 😂
@riccardoguitar
@riccardoguitar 29 күн бұрын
She already done a longer vid for freeCodeCamp 2 years ago and she's on FrontedMasters as Teacher kzbin.info/www/bejne/rpTOeWipaLqojpY
@theblackelephant
@theblackelephant 27 күн бұрын
Same here❤❤❤❤❤
@pubudusenarathne
@pubudusenarathne 16 күн бұрын
Exactly!!
@ryandawson1220
@ryandawson1220 26 күн бұрын
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.
@fadichamieh
@fadichamieh 14 күн бұрын
100%
@jamesallen74
@jamesallen74 Ай бұрын
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.
@draco_2727
@draco_2727 Ай бұрын
9 years ago was this video... her video seems a rip-off kzbin.info/www/bejne/bpKqmY2HoNR5mLM&ab_channel=JSConf
@TheNomadsTimeCapsule
@TheNomadsTimeCapsule 27 күн бұрын
I can only agree. Especially for this topic, it was hard to find such an amazing explanation. You really helped me out. Thank you,
@modolief
@modolief 14 күн бұрын
ditto
@Ainigma
@Ainigma 18 күн бұрын
@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.
@ramlaaal
@ramlaaal 22 күн бұрын
wow the visualization is awesome. The colours, gradients, design and animation. Its perfect down to the tiny details.
@amulpatel
@amulpatel 21 күн бұрын
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.
@thepassionatecoder5404
@thepassionatecoder5404 22 сағат бұрын
God bless you Lydia. Hands down the most important and enlightening JavaScript tutorial on the KZbin that every serious JavaScript developer needs. God
@scaly86
@scaly86 17 күн бұрын
The sign of mastery is being able to simply explain a complicated concept. This preso is a thing of beauty... and mastery!
@huycaoviet8367
@huycaoviet8367 Ай бұрын
I finally understand Event Loop after 1 year writing JS.
@ericjeker
@ericjeker Ай бұрын
Don't worry, many devs still don't understand it after 10 years of writing JS.
@jonniem
@jonniem Ай бұрын
I thought I did… until today😅
@lamhung4899
@lamhung4899 29 күн бұрын
No you do not 😂
@chess4964
@chess4964 27 күн бұрын
huh do you need to understand it? coding js/ts for 3 years now
@ahmedmaaz4390
@ahmedmaaz4390 9 күн бұрын
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.
@SaiPrakash16
@SaiPrakash16 Ай бұрын
By far the most simple yet effective way to show event loop . Really enjoyed it
@HamzaKhan-rs2yo
@HamzaKhan-rs2yo Ай бұрын
The visualization is outstanding, providing one of the clearest and most informative explanations I've come across.
@paulopontovaz
@paulopontovaz 10 күн бұрын
Whoa, I'm so happy that this channel exists. The visuals help SO MUCH with understanding all the JS flow!
@slevinstayshere
@slevinstayshere 23 күн бұрын
I'm a web programmer for 15+ years now and I'm stunned how well made this explanation is. really Amazing! Subscribed right away!
@leepaulison4928
@leepaulison4928 27 күн бұрын
Lydia, your teaching style is the best I've seen. Please continue to educate us.
@viatrixhd
@viatrixhd 26 күн бұрын
I have been programming for some years now, as a visual learner this video was awesome. Perfectly visualized and straight to the point! Keep up the great work
@flnnx
@flnnx Ай бұрын
I'm preparing for an interview and this helps a lot. The promises video and this one are simply incredible. Love the series.
@jackwright517
@jackwright517 29 күн бұрын
Whoaaaa... Ive been writing js for years and this is hands down the BEST event loop video resource ive ever seen. My god its presented so simply! 💯
@gabriellinassi3382
@gabriellinassi3382 Ай бұрын
Thank you, Lydia. You explain very well. After 3 years writing JS, I'm finally taking the time to go back to the basics and learn the fundamentals and I'm learning a lot
@TC14
@TC14 Ай бұрын
Top tier presentation, this is easily one of the best visualizations I've seen on KZbin. 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.
@aGoodOmen
@aGoodOmen Ай бұрын
I am in awe of the explanation and the masterful use of Keynote. Great stuff. Congrats!
@meetfilipe_
@meetfilipe_ 25 күн бұрын
I can't imagine the amount of work you put in to explain something so complex put so simply
@forkanshanto2228
@forkanshanto2228 Ай бұрын
This video brilliantly illustrates the intricate workings of JavaScript's Event Loop, Web APIs, and (Micro)task Queue. The visuals make complex concepts crystal clear, making it easier to grasp how JavaScript manages asynchronous tasks behind the scenes. Kudos to the creators.
@mohitkarki7185
@mohitkarki7185 8 күн бұрын
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.
@DesignsbyBlanc
@DesignsbyBlanc 22 күн бұрын
Never thought I grab some popcorn🍿 to learn about the inner workings of JavaScript, yet here I am. Awesome work!
@MagnumCarta
@MagnumCarta 28 күн бұрын
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.
@TheDogn
@TheDogn 25 күн бұрын
I've never seen this information provided with such uncompromising clarity. Subbed. This is the first video I've seen of yours, but if the rest are anything like this one, you're worth it. Amazing.
@JoysterRodrigues7
@JoysterRodrigues7 Ай бұрын
The presentation quality is top-notch! This is probably the best JS "under-the-hood" explainer out there
@mvkotekar
@mvkotekar 20 күн бұрын
Where was this channel all this time. Great visualization. Thanks for all the handwork to put across all the details together.
@v14mpo-fw5sd
@v14mpo-fw5sd 20 күн бұрын
Excelent video all around. Visuals, audio quality, the pace and the clarity with which you speak are superb. Thanks!
@nelsonelijah5327
@nelsonelijah5327 11 күн бұрын
This is phenomenal. I just started learning javascript coming from an Embedded systems background and never understood how the execution of commands happened. This cleared a year of misconceptions for me and unprecedented years of troubles. Wow! Some people are just goated!
@EbrahimTahernejad
@EbrahimTahernejad 20 күн бұрын
I already knew all these but still watched it because of the quality of your presentation. Great work. Keep doing what you're doing.
@user-so4kv5oo5d
@user-so4kv5oo5d 27 күн бұрын
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.
@t.k.raphaelngan6002
@t.k.raphaelngan6002 29 күн бұрын
Glad to be more clear about async stuff. Before just confused with the sequence and did not know why. Not even heard terms of promise based and callback based and their respectively being thrown to microtask queue and general task queue. Thanks 👏
@ylaguardia
@ylaguardia 25 күн бұрын
Congrats on this video. I've read a lot about this topic... articles, tweets, book passages. I've seen videos and talks about this. None of them were so thorough, clear and enlightening as this one. Keep up with the outstanding work!
@geoffreymoluba7448
@geoffreymoluba7448 24 күн бұрын
It's so well explained that after 1minutes 27 seconds of watching I had to subscribe. This is pure quality content
@sebas_xs
@sebas_xs Ай бұрын
Your explanations are crystal clear and your slides are absolutely stunning! You have a real talent for breaking down complex topics in such an engaging way. Keep up the fantastic work, you're making learning an absolute pleasure!
@marianopainefil3537
@marianopainefil3537 25 күн бұрын
Este video es INCREIBLE. Completamente deberia ser un MUST en cualquier capacitación/universidad. Millones de gracias!
@erick2051
@erick2051 4 күн бұрын
Lydia, your explanation is by far the clearest i've seen out there. I'd love to watch something similar for async-await!
@Isaac-hd6vs
@Isaac-hd6vs 19 күн бұрын
Hands down, the best event loop explanation ever!
@snoopy8870
@snoopy8870 Ай бұрын
Thank you for detailed , visualised explanation Lydia!!!
@teleprint-me
@teleprint-me 28 күн бұрын
This video showcases a true understanding of the web api and the javascript event system resulting in a extremely high quality presentation.
@Fernando-du5uj
@Fernando-du5uj Ай бұрын
Love all those illustrations. It really helps to understand the concepts. Thank you for everything you've done. Keep going! 👍
@DontFollowZim
@DontFollowZim 9 күн бұрын
I've already learned all this, but this is the probably the clearest, best, and most beautiful explanation I've seen. I need to share this...
@CrusaderMen
@CrusaderMen Ай бұрын
Thank you. This is the best explanation I've seen.
@ilonakhomenko3797
@ilonakhomenko3797 Ай бұрын
This video is absolutely amazing! Very clear and straight to the point. I often struggle with understanding JS, and I found this video incredibly helpful. Thanks, Lydia! Looking forward for your new videos 👍
@suenkaiching1580
@suenkaiching1580 29 күн бұрын
Thank you! This is absolutely the best explanation I have ever seen. 12 mins of video cleared out all the my confusions I had in event loop from day 1!!
@IceBreakerGamer
@IceBreakerGamer 2 күн бұрын
This channel is a gold mine... literally.. please post more.
@hoangduy500
@hoangduy500 20 күн бұрын
This channel is a precious gem! Thank you, Lydia. I know it takes a lot of effort, but I hope you could make more videos with excellent visual explanations like this.
@vikramtatke5930
@vikramtatke5930 29 күн бұрын
This is absolute gold! So glad KZbin recommended this video. Lydia, it is amazing to see the effort you've put into creating these slides. I subscribed in the first 60 seconds. This is how the universities should have taught us! Kudos! Looking forward to your next one!
@ShredNekM80
@ShredNekM80 19 күн бұрын
The presentation and clarity of this information is excellent! Thank you for making this video. It made understanding the Event Loop so much easier!
@marcinkossowski6579
@marcinkossowski6579 17 күн бұрын
this channel and fireship, kevin powell and web dev simplified is all a dev needs these days. Amazing job, keep it coming!
@MrFamboYT
@MrFamboYT 29 күн бұрын
Super sold on the animations and slides. Ton's of work and dedication can be seen. Super awesome.
@4733R70
@4733R70 20 күн бұрын
wow! the animations are crazy and helped me so much to understand what's going on behind the scenes! you also have a beautiful voice, it's so soothing!
@RemigiuszDudek
@RemigiuszDudek 13 күн бұрын
beautiful and simple, Lydia great work. Thank you!
@ashuvssut
@ashuvssut 17 күн бұрын
No BS just pure content! True GEM!! Subscribed right away at 4:22 These small concepts took me a long time to grasp while working with JS over the years
@nemethricsi
@nemethricsi Ай бұрын
Lydia, this is the best explanation I’ve ever heard about this topic ❤ thank you!
@eyeiaye
@eyeiaye 9 күн бұрын
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!
@TheZenJin
@TheZenJin 25 күн бұрын
Just wow! This is pants down the best Tutorial-Style-Vid I have ever seen. Please keep it up, I love it!
@ssygon2
@ssygon2 22 күн бұрын
Nice visual explanation of the types of stack n queues used for each call and the event loop lifecycle.
@SanketBhat7
@SanketBhat7 24 күн бұрын
So far the best explanation of how Java script works. Thanks
@uncle.boonmee
@uncle.boonmee Ай бұрын
this is very difficult to me, but your explanation was perfect. you're a great instructor and the presentation is beautiful!
@miguelbautista3628
@miguelbautista3628 28 күн бұрын
The slides really made it click, keep sticking to that way of teaching, that was great
@warta312
@warta312 7 күн бұрын
Hope you keep doing this great job. This is one of the best explanations I've seen in the last few months.
@TaekwondoGer
@TaekwondoGer Ай бұрын
I am so glad that you keep on doing these videos. They are more than just awesome!
@AntonioLettieri
@AntonioLettieri Ай бұрын
Best example of a task queue I have seen in a very long time.
@cusematt23
@cusematt23 18 күн бұрын
I've seen 2-3 of Lydia's videos over the years (not sure if they are all of this channel) and they really are just phenomenally well-organized and delivered. I always learn a ton even though I have sadly watched a large proportion of JavaScript KZbin and one might think I have seen everything. Well done Lydia! Hope to see more in the future.
@Henrique01010
@Henrique01010 Ай бұрын
Love this illustrations, gets really easy for any beginner to follow along with you explanation
@jojodi
@jojodi 29 күн бұрын
This was fantastically produced. Thanks for the clear explanation and visualization!
@eestidev
@eestidev 28 күн бұрын
only 2 videos, and you are still killing it. Amazing content!
@hellcat8886
@hellcat8886 16 күн бұрын
Pls, don't stop making videos like this, it's really enlightening!❤
@vasudevkoneru
@vasudevkoneru Ай бұрын
A brilliant explainer. Just what I was looking for coming from a Java ecosystem. Visuals are stunning. Thank you ma'am!
@kaipang-whitsett2379
@kaipang-whitsett2379 Ай бұрын
This is the type of visualization that coding vids need
@AndrewTSq
@AndrewTSq 29 күн бұрын
it reminds me of debuggers we used to have in the late 80ies
@fadichamieh
@fadichamieh 14 күн бұрын
Simply Great illustration of a seemingly simple yet inherently complex topic: JavaScript tasks and async / promise execution
@sylensdrake9706
@sylensdrake9706 Ай бұрын
This is by far the best explanation for the event loop ive ever seen. This is going out to the rest of my team. Great job. U got my sub
@LIZzARDsTeam
@LIZzARDsTeam 17 күн бұрын
Amazing presentation style, very nice and smooth animations, clear explenations and ended with a tricky question to make sure people understand the topic. This truly must be the best way to learn. Thank you for the video.
@noorulamin2652
@noorulamin2652 Ай бұрын
Thank you! 💌 This is hands down the best explanation I've come across.
@MM-ts9jy
@MM-ts9jy 12 күн бұрын
I must say, this is the best visual representation of JS I've seen so far
@zackanderson6084
@zackanderson6084 20 күн бұрын
Amazing explanations, and I love the reiterative approach of the ideas and concepts!!
@joaquinarlettaz
@joaquinarlettaz Ай бұрын
What an amazing work! Apprecciate very much that level of details, animations & explanations, so clear, loved it. Thanks lyd!
@valde_ua
@valde_ua Ай бұрын
It's brilliant explanation. Visualization is on a high level, perhaps the best one I have ever seen. Thanks!
@GUYX10
@GUYX10 12 күн бұрын
One of the best explainer videos I've ever seen, thank you! Subbed
@DannyCallaghan
@DannyCallaghan Ай бұрын
A better video or explanation of the JavaScript event loop than this does not exist. An outstanding video.
@riccardoguitar
@riccardoguitar 29 күн бұрын
Always her 2 years ago for freeCodeCamp kzbin.info/www/bejne/rpTOeWipaLqojpY
@gustavokobayashi2738
@gustavokobayashi2738 18 күн бұрын
Extraordinary graphics, not to mention the content quality. Congratulations and keep up with the great work
@theseus_dev
@theseus_dev 21 күн бұрын
Absolutely loved your course on Frontend Masters! Super excited about your new KZbin channel and can't wait for your upcoming videos. By the way, hands down, your lectures and the way you explained this topic is the best I've seen.
@zlatanonkovic2424
@zlatanonkovic2424 23 күн бұрын
Extremely well structured! The quiz in the end was a great idea
@sauravbond
@sauravbond 29 күн бұрын
One of the best video I have seen related to event loop, visualization is top notch
@prasadhonrao
@prasadhonrao Ай бұрын
I seriously need to think of my presentation skills. Well done ma'am. You got a new subscriber.
@pryansh_
@pryansh_ 18 күн бұрын
I were to make notes on my notion for this.. but adding just the youtube link.. Best explanation on entire Internet by a great margin. Subscribed !
@danielwilkowski5899
@danielwilkowski5899 20 күн бұрын
I can't believe, there is literally not one incorrect word here. Amazing.
@lmarts
@lmarts 25 күн бұрын
Wow! I'm surprised at how well the JavaScript asynchronous lifecycle is explained in this video. The best of its kind bar none.
@noozytechz
@noozytechz 13 күн бұрын
What you've done is mind-blowing, ma'am.
@Cangussu97
@Cangussu97 13 күн бұрын
Absolutely incredible explanation and visualisation. Thank you!!
@asdfz0mg
@asdfz0mg Ай бұрын
Amazing visualizations and well explained! Truly a worthy successor to Philip Roberts talk from JSConf EU 2014.
@haraseesgill8491
@haraseesgill8491 15 күн бұрын
This is a really great resource for learning the importance of the event loop. This is the perfect medium between deep technical understanding and practical application of the event loop and Javascript as a whole. Even though I knew all of this, I found it refreshing relearning with the way you organized information, and I even forgot about the Microservice queue so that cleared up some of my async JavaScript understanding. This was an awesome watch! Looking forward to your future explanations/animations. Please keep it up 😁
@abcdabcd8605
@abcdabcd8605 Ай бұрын
Amazing explanation on Event Loop. 100% would recommend to anyone who wants to learn about Event Loop.
@Hlfe0
@Hlfe0 28 күн бұрын
That is some high quality stuff. High quality video, high quality slides, and high quality knowledge. I think you’re on the way to becoming one of my favorite channels 🤛🏼👏🏼,, Keep up the amazing work.
@shokhbozabdullayev6260
@shokhbozabdullayev6260 17 күн бұрын
This was so well structured visualization and I was able to find the answer for the quiz correctly and I have become sure that the confusion around Event Loop/Callback/(Micro)TaskQueue do not bother me anymore. Thanks @theavocoder )
Roadmap for Learning SQL
4:52
ByteByteGo
Рет қаралды 202 М.
Каха с волосами
01:00
К-Media
Рет қаралды 5 МЛН
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 34 МЛН
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53
Mini Jelly Cake 🎂
00:50
Mr. Clabik
Рет қаралды 16 МЛН
JavaScript Visualized - Promise Execution
8:42
Lydia Hallie
Рет қаралды 106 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 300 М.
Every React Concept Explained in 2024
4:31
BOOG Codes
Рет қаралды 2,4 М.
Top 6 Tools to Turn Code into Beautiful Diagrams
3:24
ByteByteGo
Рет қаралды 509 М.
PROOF JavaScript is a Multi-Threaded language
8:21
Beyond Fireship
Рет қаралды 257 М.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 149 М.
Why You’ll WASTE The Next 3 Years…
6:06
Travis Media
Рет қаралды 190 М.
Interview with Senior JS Developer 2024 [NEW]
6:45
Programmers are also human
Рет қаралды 372 М.
What does larger scale software development look like?
24:15
Web Dev Cody
Рет қаралды 1,2 МЛН
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 530 М.
Каха с волосами
01:00
К-Media
Рет қаралды 5 МЛН