JavaScript Question: An Event Loop Problem

preview_player
Показать описание
In this tutorial we are going to look at a JavaScript problem that requires a knowledge of the event loop and how it interacts with the queue and the call stack in order to get right.

Would you like to help keep this channel going?

For more resources on JavaScript:

#javascript #AllThingsJavaScriptLLC
Рекомендации по теме
Комментарии
Автор

Nice example. Asynchronous code is always a confusing topic to anyone new to programming and this snippet is a display of a typical asynchronous behaviour. I wish you and all the members of this community a happy new year. Keep coding, guys!

tirmey
Автор

I guessed 1, 1, 5, but due to an arithmetic miscalculation on the while loop, but my asynchronous reasoning was correct. Happy New Year to you and your family prof Hancock.

DesignfulDev
Автор

Thank you very much for sharing such an interesting exercise! They are very useful to get a better grasp of the event loop :)

RodrigoDAgostino
Автор

Great. How would I use this on the front-end to make money?

scottonanski
Автор

Awesome description...I have question regarding event loop running in browser. So this event loop is attached to tab opened in browser or for all tabs there's only one event loop running in browser??

karthikkedarisetti
Автор

thank you for your awesome videos. I get 1 1 some weird arrow-like < . 4 and 6 after why?

paz