Event Loop Flashcards
1
Q
What is the event loop in JavaScript?
A
Keeps track of the things on the call stack and callback queue
-when the call stack is empty, the event loop takes the first thing in the callback queue and moves it to the call stack
2
Q
4 things that make JavaScript unique
A
how “this” is used, event loop, closures, prototypal inheritance
3
Q
What is different between “blocking” and “non-blocking” with respect to how code is executed?
A
Blocking code sits on the call stack until it runs all the way through
Non blocking code pops off the callstack and waits until all other sync functions are done running