
Effective JavaScript
by David Herman · first published 2012
29mentions
20recommended by
26HN commenters
2013–2022first – last mentioned
77% recommend19% neutral4% critical
Why HN recommends it
Practical, short guide to JavaScript's quirks and pitfalls, with code examples worth working through. Suits self-taught or intermediate developers who want to understand the core language and why it behaves as it does.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








To the people who wish they could answer that question with confidence, I recommend getting this book: http://www.amazon.com/Effective-JavaScript-Specific-Software... Just got it and I feel like it clarified so many things about Javascript that I didn't have down cold as a self-taught pragmatist.
on “Interviewing as a Front-End Engineer in San Francisco” ↗I'll second the author's recommendation of Effective JavaScript by David Herman. I've found it very helpful: http://effectivejs.com/
on “Learning JavaScript - my experience and advice” ↗…garbage-collected. E.g. if object `A` has a reference to object `B`, `B`'s memory won't be freed even if you never use it again. MDN has a better explanation and example [1] As for books I'd recommend Effective Javascript by David Herman. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memo...
on “Js Game Wiki” ↗"The Good Parts" is still a good one, but my recommendation these days now goes to Effective Javascript: http://www.amazon.com/Effective-JavaScript-Specific-Software... Outside of books, http://superherojs.com is another good resource to recommend.
on “Ask HN: Is JavaScript the Good Parts still relevant?” ↗Tastes in books varies wildly between developers: there are many on there that I wouldn't say helped me as much as others, but to each their own! With that in mind, I'd put a plug in for David Herman's _Effective JavaScript_. It goes beyond simply stating the mechanics of JavaScript into what pitfalls can be had, and uncommon but critical factors to consider when writing your code. The point about UTF-16 code points in strings…
on “How to Become a Great JavaScript Developer” ↗…https://github.com/tastejs/todomvc/tree/gh-pages/examples/va... What does the framework buy you? Is the framework-powered code easier to read? Easier to understand for a newcomer to the code base? 2. Read every line of Effective Javascript (it's short and eminently practical) and write out every code example. http://www.amazon.com/Effective-JavaScript-Specific-Software... There are about a dozen small errors in the code in the book, see…
on “The Hitchhiker's Guide to Modern JavaScript Tooling” ↗…had to code one really smart thing myself. * JSON: Think in JSON all day - now that's nice. Serializing things to Lists, Maps, Tuples and what have you gets old. And also read books: * David Herman: Effective Javascript * Marijn Haverbeke: Eloquent Javascript * Daniel Parker: Javascript with Promises * Douglas Crockford: Javascript, The Good Parts (well actually I found this one hard to reason about :) )...
on “JavaScript as default language and software stack” ↗Eloquent JavaScript - Marijn Haverbeke Effective JavaScript - Dave Herman Functional JavaScript - Michael Fogus Once you know JavaScript, dig into the codebase of larger mature projects by the most prolific/well-known developers in the JavaScript community,…
on “Ask HN: Curriculum for learning JavaScript, JQuery, and Node?” ↗Mostly pre-es6, but this is my favorite "intermediate -> advanced" JavaScript book: https://www.amazon.com/Effective-JavaScript-Specific-Softwar... There are gaps/things that have changed since the book came out, but this is a really great resource for understanding the core JS language.
on “Ask HN: Resources for learning advanced JavaScript and React” ↗Effective JavaScript by David Herman
on “Ask HN: What are the latest and greatest books on your favorite language?” ↗I am 3,000 hours into the DIY phase myself, so I appreciate your list. I think Effective Objective-C and Effective JavaScript (as well as the "Good Parts" and "Secrets of a JS Ninja") were good books. Also, the C book, since it is difficult to understand Objective-C without a firm grip on C. Although, there are certainly more…
on “DIY Computer Science Degree” ↗I concur. I recently finished Effective JavaScript, and found it to be an excellent and insightful read.
on “Interviewing as a Front-End Engineer in San Francisco” ↗Instead of worrying about how bad JS is, read JavaScript the Good Parts and Effective JavaScript and focus on how good much of it is. Yes, JavaScript has oddities and there is a quite short list of pitfalls you have to learn to avoid ('==' vs '===' for example), but it also has some very powerful…
on “We switched to Node.js: the good and the not so good” ↗There's a lot of special rules here, though. "Effective Javascript", in the the objects chapter is the best guide I've read to understanding JS objects. A quick tip is to implement lightweight dictionaries as literal objects to avoid prototype pollution.
on “Ask HN: How should you actually do objects in Javascript?” ↗…the book yesterday and it's definitely worth it. I would buy it again even if I knew it was free. It's in my top JavaScript books, along with others like Maintainable JavaScript, Testable JavaScript and Effective JavaScript. @raganwald I hope you plan to write other JS books as well, you're one of the most original && intelligent authors out there.
on “JavaScript Allongé is free” ↗