Eloquent JavaScript 3rd Edition (2018)

This is a book about JavaScript, programming, and the wonders of the digital. You can read it online here, or get your own paperback copy. Written by Marijn Haverbeke. Licensed under a Creative Commons attribution-noncommercial license. All code in this book may also be considered licensed under an MIT license. Illustrations by various artists: Cover…




           Cover image   


This is a book about JavaScript, programming, and the wonders of   the digital. You can read it online here, or get your own    paperback   copy .


Written by Marijn Haverbeke.



Licensed under   a Creative   Commons attribution-noncommercial license . All code in this book   may also be considered licensed under   year MIT license .


Illustrations by various artists: Cover and chapter illustrations   by Madalina Tantareanu .   Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular   expression diagrams in Chapter 9 generated   with regexper.com by Jeff   Avallone. Village photograph in Chapter 11 by Fabrice Creuzot . Game   concept for Chapter 15 by Thomas   Palef .


The third edition was made possible   by 325 financial backers , most   notably Nextjournal and Holberton School. The second edition   was supported by 454 backers , with   significant contributions   from Mozilla, Hack Reactor,   and Ghostery.


Read More


  1. wdb

    I am unable to find out what has changed between editions

  2. ternaryoperator

    This is from 2018. The title of the post should be updated.

  3. neovive

    I'm actually working through this book right now. I've been away from front-end coding for a bit and my weekend/evening project over the next month is to brush up on modern Javascript and ReactJS. This book is very well written and great re-introduction to JS/programming fundamentals.

    For those interested–Besides this book, my current learning plan includes:
    Javascript 30 by WesBos
    Exploring ES6 [exploringjs.com/es6/]
    Learning React-2nd Edition on O'Reilly Learning
    The Beginners Guide to React on Egghead
    Data Structures and Algorithms in JavaScript on Egghead.

    I also used Kent C. Dodds' excellent "JavaScript to Know for React" article as an outline.

  4. shanghaikid

    I really like the first edition…

  5. drongoking

    Is this worth buying/borrowing if you already know programming languages but not Javascript? Or is there a better approach?

  6. warent

    I would consider myself pretty close to an expert with JavaScript. I've been using it for 5 years professionally, currently use ES2020. Fairly familiar with Node 12, V8, etc. But I'm always worried about those situations where you dont know what you dont know. This might sound strange, but would anyone recommend any reading material or blogs for someone at my level?

  7. kevindeasis

    Here are the things that I really really hate about javascript:

    I find javascript really hard and annoying, even if I have enough experience with JS that lets me build a basic react framework, I still find it hard to use.

    On top of that, getting javascript jobs is harder compared to other programming languages. IE: you need 7 years of experience for a company at the same level where they only need 1 year of IOS/Android experience.

    You always have to be keep up to date. The popular libraries that you can use changes so fast, and sometimes they don't even work.

    Javascript gets a lot of disrespect from beginner engineers. Something about doing frontend work, isn't hard and it isn't software engineering in their perspective

    There are so too many ways to do the same thing, unlike something like lets say golang

    You always have to learn more than javascript to compete with other javascript developers. IE: dev ops, backend, database, sre, ux design

  8. BenoitEssiambre

    I've been toying with the idea of promise free async/await lately. I'm interested in feedback anyone would have.


  9. 0xff00ffee

    I always skip to the async part of JS text because explaining it is a bit like handing a shotgun to a five year old. I think the folks over at risingstack have the best explanations, IMHO.

    I'm surprised they attempted timeouts in promises with so little text, that's actually pretty dangerous pattern because it glosses over the complexity in actually stopping an in-flight promise. It is VERY easy to end up with hundreds of thousands of unresolved promises with their pattern. Dangerous!

    There is a great repo on this issue…. aand I can't for the life of me find it. Basically there's a github project that uses generators and passes an atom down through the call stack to ensure everything below the race promise is aware that it is being halted. And even that doesn't handle all the nuances of this pattern.

    And if anyone knows what github repo I'm talking about, I'll give you … 50 DKP?

  10. tracer4201

    As someone who hasn’t done much JavaScript since AngularJS in 2014/2015, what is the current state of JS like?

    I see there’s Angular (not AngularJS that I worked with), React, and some other frameworks. I see there are all kinds of bundlers and plug ins for these things.

    When I was doing AngularJS, I’d just link to a few dependencies manually from a CDN. Looks like now there’s a bunch more complexity and package management for front end dependencies.

    It feels like FAR more complexity, but I’m not sure what has been gained. I also don’t know that much, so would love to learn perspectives here from people actively developing in this space.

  11. chrischen

    Does anyone have a book recommendation (free or paid) that is modern and up-to-date, preferably regarding typescript, that talks about best practices and patterns for large-scale project design and code structure?

    For example, a book that could go into details of code practices at companies like Airbnb, Facebook, or Google.

  12. mesaframe

    I read this book and found that explanations of quite a number of topics were misleading.

  13. smlckz

    JavaScript is very expressive and powerful language. Maybe hard to learn. The prototypal inheritence and 'this' were confusing to me and took much time to understand those.

    Then I learnt that prototypal inheritance is a superset of ''class''ical inheritance [1] as well as this [2]. Hmm.

    With Reflect, Proxy etc. you have great metaprogramming capabilities that make this language much powerful.

    Still, there are some (many?) edge/corner cases and unfixable bugs (aka features) that the language is stuck with for the sake of backwards compatibility and developers have to learn these. (The most famous of these might be typeof null === "object")

    When I look at the amount of features added to the language specification, sometimes it seems like it is going to become another incarnation of the C++ specification.

    I still like its expressiveness and power, but if it becomes another C++ in future, I have to look somewhere else. (TypeScript maybe.)

    [1]: aaditmshah.github.io/why-prototypal-inheritance-matters/
    [2]: wiki.c2.com/?ClosuresAndObjectsAreEquivalent and crockford.com/javascript/private.html

  14. markthethomas

    this. is. awesome. SO glad this book is being kept up to date

  15. johnchristopher

    Is there an equivalent for php?

  16. mrwww

    We used EJS in our basic programming courses in my CS program and it was a great book. Loved the exersices you could try directly in the book!

    I now program JS for a living so i guess the book also really worked. Thank you for the third edition!

  17. htatche

    There is an equivalent for Ruby too in case you're interested.

  18. fizixer

    Can anyone recommend reading for the web-related Javascript "API" so that when Javascript is used in the form of generated code, e.g., through asm.js, the "API" can be used by the "generating program" without the need to learn all of Javascript.

    Essentially so you could do HTML/CSS/some-other-language (using asm.js, emscripten, or some similar technology) instead of HTML/CSS/JS.

  19. varrock

    Great read, though his writing style is less intuitive if you are fairly new to JavaScript and trying to grasp some of its concepts. For example, in his reduce function [0] example, he names his variable "current" to bind the accumulated value the reduce function is going to eventually return. That is a totally fair name, but I don't know if it really "clicks" if you were reading over this for the first time. I think it would be faster to grasp the reduce function's purpose if it was simply named "accumulated" or something alike, especially when this snippet is advertising the idea of higher order functions and callbacks.

    Little things like this I am nit-picky about, but overall, great book.

    [0] eloquentjavascript.net/05_higher_order.html#h_fx3e34kT/k

Add a review

Your email address will not be published. Required fields are marked *

Vendor Information

  • Vendor: Platinum
  • Address:
  • No ratings found yet!