Event Loop explained in 3 minutes

preview_player
Показать описание
Event Loop in JavaScript explained with simple words and a concrete example. Understand the secret behind JavaScript's asynchronous programming.

Let me know in the comments if you have CS theme's that you'd like to see explained like this 🙃

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

MY DESK SET UP 🔥

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

MORE VIDEOS IN MY CHANNEL:

#eventloop​ #javascript​ #softwareengineer​ #computerscience
Рекомендации по теме
Комментарии
Автор

Thanks for the comments, everyone! Should I try to record more videos like this one, short explanations?

coding_nomad
Автор

Out of another three videos that lasted more than 10 minutes you provided the best explanation and visuals on the event loop. Thank you so much.

kanankontorovsky
Автор

compared to the tons of 10+ minutes videos on this subject, this is the best explanation in a short time! bravo!

mondirhallouli
Автор

Frankly, for all these years I never knew or actually had to know how it works exactly, you intuitionally get a feel for sync and async JS.

Korutz
Автор

The way of teaching is too adorable 🥰🥰

sangulakshetty
Автор

the shortest videos are often the best! So technically the second function will not execute exactly after 1 second, it's better to say it will execute at minimum 1 second since if the call stack is taking a lot time to execute it delays moving the event queue to the call stack?

snakeb
Автор

so simplified and concise..just perfect for revision before interview! thank you

prakashpoudele
Автор

Great explanation
Simple and easy to understand

sunilkumar-sqvj
Автор

thank you for the explaining it so straight forward

kevinandrade
Автор

this is the best explanation in a short time!

faruqkhan
Автор

The simplest explanation I found so far!

onurtravels
Автор

I think there is something missing, maybe the microtask queue?

rishabhanand
Автор

Really nice explanation! Just 2 questions, first are the AJAX, Promises, DOM in the Event Table all being ran in parallel? and second do Javascript need to clear the Call Stack before any function is run in the Event Table or Event Table is being taken care of in the background? Thank you!! 🙂

yabuking
Автор

Thank you very much for this short and simple explanation . It helped a lot !!!

vishvsalvi
Автор

The only thing I found confusing is the diagram of the call stack. I thought items are pushed onto the call stack and popped off the top. So function one would be the only item on the stack until it's finished running. Then the 2nd function would be added, however since it is async, the 2nd function would be waiting in the even queue and the third function would be added to the top of the call stack. Only one that function pops off, would the 2nd function be free to complete. That's my understanding. Would be curious for some clarification on this as I am seeing the concept explained in different ways.

chrtravels
Автор

Hi how r u I have completed my data science in python and I want to become a freelancer can u plz adv. What are the project I can do for an attractive portfolio plz watting for u r vid.

habeebahmed
Автор

very simple and easy to understand, thanks. Why don't you make youtube tutorials?

sony
Автор

thank you very much you explained it in a super simple way I will be going to remember it for a very long time.

lalammadhusainadh
Автор

Thank you for the explanation! Love your channel by the way! ☺️

TechGalDiaries
Автор

I didn't know that the event table was there to put the setTimeout after the time passed. Now I know how JS solves the problem of "order of insertion" vs "shorter timer", because I thought that as soon as a setTimeout was found, it would get inserted at the end of the Callback Queue. What if two were inserted, but the last had a shorter timer? I had no idea of how JS solves this problem. Now I know. Thanks!

matheuslvesfcc