Too Long; Didn't Read
JavaScript has a concurrency model based on an event loop, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks. This model is quite different from models in other languages like C and Java. Modern JavaScript engines implement and heavily optimize the described semantics. The event loop got its name because of how it's usually implemented, which usually resembles: while (queue.processNextMessage()) Each message has an associated function which gets called in order to handle the message.