the-event-loop Flashcards

1
Q

What is the JavaScript Event Loop?

A

JavaScript has a runtime model based on an event loop, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks. How the environment is able to schedule and track events and code associated with them. Start to finish is the main thread. Event loop runs asynchronous things (timers, tasks, things like environment APIs, ways for listening to events triggering functionality). System for scheduling asynchronous tasks to be run and what to run them based on

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 means that while it is running, nothing else can run. non blocking means maybe it cant start and update, but doesnt prevent other code from running

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