event loop Flashcards
1
Q
What is the JavaScript Event Loop?
A
Looks at stack and task queue, if task queue is empty, pushes first thing to the stack to run.
2
Q
What is different between “blocking” and “non-blocking” with respect to how code is executed?
A
Blocking methods execute synchronously (nothing else can happen only one code); while non-blocking methods execute asynchronously (other code can run).
3
Q
Main take aways
A
when doing asynchronous stuff.
things that takes a long time will get pushed to side, so other stuff can keep runnning.