The event loop behaves like a queue of event handlers. Every time you `await` on a promise, you are effectively yielding the main thread
This concurrency strategy is good enough for most web applications. That’s because most web applications don’t do much heavy computation, they spend most of their compute time waiting for network requests. REST APIs don’t store data, they usually defer that work to a database. Browser apps typically make requests to APIs and render the results, but the actual compute time spent rendering versus waiting for HTTP requests is typically small.