Eloquent JavaScript: A Modern Introduction to Programming by Marijn Haverbeke
This book shaped how I think about JavaScript. Not just the syntax — the mental models.
1 Nov 2024

This book shaped how I think about JavaScript. Not just the syntax — the mental models.
Haverbeke doesn't write a reference manual. He writes a book about programming that happens to use JavaScript. The difference matters. You come away understanding closures, higher-order functions, and the event loop not as trivia, but as tools you know when and why to use.
The exercises are the book's secret weapon. They're genuinely challenging. Not busy work. Each one forces you to apply what you just read in ways that stretch your thinking. I remember struggling with some of them early in my career and feeling the click when concepts finally connected.
The chapters on functional programming and data structures are excellent. Haverbeke explains these concepts with clarity that most CS textbooks lack. The way he builds complexity gradually — from simple values to modules to asynchronous programming — mirrors how you actually learn to code in the real world.
Where the book struggles: the later chapters on Node.js and the browser feel rushed compared to the language fundamentals. They're adequate but not at the same depth. If you're looking for a comprehensive guide to Node or browser APIs, you'll need additional resources.
The other trade-off: this book assumes a willingness to think hard. It's not a "learn JavaScript in 21 days" book. If you want copy-paste recipes, look elsewhere. Haverbeke expects you to wrestle with concepts. That's a feature if you're serious about understanding the language. It's a barrier if you just want to get something working.
The book is also freely available online, which is remarkable. Haverbeke updates it regularly, keeping pace with language changes. That ongoing investment shows.
Read this if you want to genuinely understand JavaScript, not just use it. It's the book I recommend to every developer who asks me how to get better at the language. Start here. Do the exercises. Don't skip the hard ones.