Marijn Haverbeke

Eloquent JavaScript (Free Book)

Marijn Haverbeke's fourth edition, free online — language fundamentals, the browser and Node, with projects including writing your own interpreter.

FreeIntermediate10+ hoursEnglishJavaScript
Go to course

Opens on Marijn Haverbeke — a direct link, no affiliate tracking.

Course overview

Marijn Haverbeke wrote a book about programming that happens to use JavaScript, and that distinction explains both why people love it and why some people bounce off it hard. The fourth edition landed in 2024 and it's free to read online under a Creative Commons attribution-noncommercial licence, with all the code additionally under MIT.

It's structured in three parts. Part 1 is the language itself — values and types, program structure, functions, data structures, higher-order functions, and object-oriented patterns — punctuated by two project chapters where you build a delivery-robot simulation and then implement a small programming language. Part 2 moves into the browser: the DOM, events, canvas, HTTP and forms, with a platform game and a pixel-art editor as its projects. Part 3 covers Node and ends with a skill-sharing website.

What makes it different

Most JavaScript books teach syntax and then teach the browser. Haverbeke teaches how to think about a problem and reaches for JavaScript because it's at hand. Writing a language interpreter in chapter 12 is not a normal thing to ask of a beginner book, and it's the chapter people remember years later.

The online edition has editable code sandboxes throughout, so examples run in place, and exercise solutions are available if you get properly stuck.

Why it is harder than it looks

The database has this filed as Intermediate and that's correct, despite the book being widely recommended as a first read. The prose is dense, the exercises escalate fast, and there are stretches — chapter 5 on higher-order functions, chapter 6 on object prototypes, chapter 11 on async — where a lot of readers stall and quietly stop.

It also doesn't hold your hand about tooling. There's no npm walkthrough, no bundler, no framework, no advice on how to structure a real project. You come out of it a better programmer with no idea how a modern JavaScript codebase is assembled. That's a deliberate choice, not an oversight, but it means the book is half of an education rather than all of one.

Who it's for — and who should skip it

Best for people who already write a bit of code and want to get genuinely good, and for anyone who prefers reading to watching. If you enjoy sitting with a hard exercise for an hour, this is your book.

Skip it as a first exposure to programming — freeCodeCamp or The Odin Project will get you moving faster and keep you there. Skip it too if you need to ship something next month, because the interpreter chapter will not help you with that.

Our take

The best-written JavaScript book there is, free, and legitimately difficult. Our reservation is the drop-off rate: recommend it to a total beginner and there's a good chance you've handed them the book that convinces them programming isn't for them. Timing matters more than quality with this one.

At a glance

Price
Free
Level
Intermediate
Time to complete
10+ hours
Language
English
Certificate
Not offered
Taught by
Marijn Haverbeke
Category
JavaScript
Last checked
26 Aug 2026

Topics covered

  • javascript
  • book
  • projects

More like this

Other courses covering the same subjects.

Ilya Kantor

Free

The Modern JavaScript Tutorial

Ilya Kantor's long-maintained JavaScript textbook: language internals, the DOM, async and browser APIs, with exercises and worked solutions…

Beginner10+ hrs
View →

Akshay Saini

Free

Namaste JavaScript

Akshay Saini's deep look at JavaScript internals — execution context, hoisting, scope chains, closures and the event loop, drawn out on a…

Intermediate4–10 hrs
View →

Microsoft

Free

The TypeScript Handbook

Microsoft's official TypeScript guide — basics, narrowing, generics, conditional and mapped types. Explicitly not a tooling or JavaScript…

Beginner2–4 hrs
View →

Reviews

No reviews yet

Took this course? Share what you thought.