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.

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 methods execute synchronously (nothing else can happen only one code); while non-blocking methods execute asynchronously (other code can run).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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