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.
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.