the-event-loop Flashcards

1
Q

What is the JavaScript Event Loop?

A

The event loop has one job -> to look for things in the callback queue and to toss them into the stack when the stack is empty.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is different between “blocking” and “non-blocking” with respect to how code is executed?

A

“Blocking” code sits in the call stack while it runs and “non-blocking” code sits in the queue which only runs when the stack is empty. “Non-blocking” code lets the render queue update the look of the webpage while “Blocking” can freeze the page and not update the visuals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly