We’ve all been there: a web page freezes while something loads, buttons stop responding, and the user thinks the whole thing is broken. That’s the problem asynchronous code solves: how to do work that takes time—like fetching data from a server—without locking up the browser. In this chapter we’ll see how the JavaScript event loop works, why raw callbacks can turn into a tangled mess, and learn how Promises and async/await keep our code readable and our apps snappy.