the-event-loop Flashcards

1
Q

What is the JavaScript Event Loop?

A

event loop checks the call stack and task(callback) queue, if the stack is empty, it takes the first thing in the task queue and pushes it on to the stack.

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 runs in v8 engine and prevent other code from running, it is synchronous. non-blocking code goes to the event loop and other codes can still run, it is asynchronous.

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