Eloquent JavaScript 4th edition (2024)
A new 4th edition of the free online book *Eloquent JavaScript* is drawing praise as a clear, in‑depth way to learn modern JavaScript, with updates for 2024 features like private fields, ES modules in Node, and generators. Commenters debate whether beginners should start with plain JavaScript or TypeScript, how best to teach core concepts such as variables/bindings and error handling, and where this book fits alongside other resources like “You Don’t Know JS” and JavaScript.info. Many credit earlier editions with helping them move from superficial scripting knowledge to a deeper understanding of programming and computer science fundamentals.
Overall reception & impact
- Widely praised as many commenters’ favorite JavaScript book; several say it “taught me JavaScript” or was their first real introduction to computer science.
- Seen as suitable for people who already know some programming and want to go deeper into JS, rather than an ideal first-ever programming book.
- Often recommended alongside other resources such as “You Don’t Know JS,” JavaScript.info, and various “impatient” / “deep” JS books.
- Some readers don’t particularly like the author’s personal style but still find the book extremely valuable.
JavaScript vs TypeScript for learners
- One camp argues beginners should start with plain JS:
- Avoids confusion over what’s core language vs tooling.
- Mirrors past issues where people blamed “JavaScript” for DOM/browser quirks.
- TS may eventually change or fade; JS is the stable base.
- Another camp recommends starting directly with TypeScript:
- Described as the de facto standard in much of industry.
- Any JS is valid TS, and type inference keeps syntax overhead low.
- Strong benefit for refactoring and large projects.
- Concerns raised that TS can mislead newcomers about runtime types; runtime validation libraries (e.g., schema/parse libs) are mentioned as important complements.
Fourth edition updates & format
- Described as “adjusted to the realities of 2024” and generally polished.
- Noted technical updates include: private fields (
#), ESM imports in Node,Object.hasOwn,**instead ofMath.pow, and more coverage of generators and async. - Several people ask for a clear changelog; others point to GitHub diffs between 3rd and 4th editions.
- Online version is free and open source; print edition is planned but not yet available.
Conceptual explanations: variables, async, errors
- Long subthread on explaining variables as “bindings” (names pointing to values) vs “boxes”:
- Supporters say “binding” matches the spec, works uniformly for primitives and objects, and is a better abstraction.
- Skeptics worry the terminology and “tentacle” metaphor may confuse beginners and that a “box” model is simpler initially.
- Async chapter is highlighted as particularly good in the new edition; previous “crow” analogy in an older edition was considered confusing by some.
- One commenter criticizes an example that throws exceptions for expected user-input conditions, arguing for explicit Result-style return objects with error codes; others defend exceptions with codes and bubbling as acceptable patterns.
JavaScript language details discussed
- Multiple comments on numbers and integer math:
- Clarification that traditional JS
Numberis a float; BigInt and typed arrays now exist for integer use cases. - Some note BigInt implementations can be asymptotically fast.
- Clarification that traditional JS
- Side discussions on strong vs weak typing, runtime vs compile-time guarantees, and the limits of type systems at API boundaries.
Learning resources & study habits
- Many readers share strategies for learning from technical books: active note-taking, doing exercises, writing out examples, spaced repetition, and treating the online interactive version as a “read–code–read–code” workflow.