Review: The best JavaScript book I’ve read
JavaScript, Reading By Dave Ward on February 16th, 2009
Having used JavaScript for over a decade, I’ve read many books covering the language. Some focused primarily on syntax. Others recounted and solved specific real-world problems.
Learning a language as a set of tasks is one way to get up to speed quickly, but it’s not a very good way to thoroughly learn a language’s nuances and idioms.
While those sorts of books certainly have their place, it’s disappointingly rare to find a book which presents JavaScript as the first-class programming language that it truly is.
After reading no more than the first page of this book’s preface, I knew that I had finally found the antidote to those trite examples of compound interest calculators and the tedious minutiae of books that spend pages on alert()’s syntax. No, this book is different than the rest…
Learning from a master
When it comes to deep mastery of JavaScript, there are few who can consider themselves Douglas Crockford’s peer. In fact, as the first to introduce JSON, you could even say that much of what I write about here is made possible by Crockford. As if that wasn’t enough, Crockford also wrote the handy JSLint tool, went on to become a JavaScript architect at Yahoo and serves on the ECMAScript committee.
I don’t mean to oversell the man. My point is simply that if there’s a single source that you can trust to accelerate your 10,000 hours toward JavaScript mastery, Crockford is as likely that source as anyone.
Right to the point
One of my favorite aspects of the book is that it is very succinct. The entire book weighs in at less than 150 pages, which is rare when it comes to a technical book. Especially rare for one aimed at an intermediate to advanced audience.
The book’s brevity allows it to be both more affordable, and also more convenient to keep handy and use as a reference. In fact, I usually find myself cracking open the book instead of searching Google, when I need to clarify a JavaScript issue.
However, such densely packed knowledge isn’t without its drawbacks. You will need to take your time and probably read some sections of the book more than once. Think of it as the Code Complete of JavaScript books. Crockford himself puts it well in this “warning” on the first page of the book:
This is not a book for dummies. This book is small, but it is dense. There is a lot of material packed into it. Don’t be discouraged if it takes multiple readings to get it. Your efforts will be rewarded.
The bad parts too
Not much time is devoted to the negative aspects of JavaScript, but the book does briefly warn us about some of the worst parts of the language. For example, do you know why these aren’t the same?
// This returns undefined return { status: true }; // This returns { status: true } return { status: true };
How about the difference between these?
// Valid var foo = { box: true }; // Syntax error var bar = { case: true };
Those are just a couple of the “bad parts” described in the book. Having been caught in a few of JavaScript’s hidden quagmires over the years myself, let me tell you that knowing the location of these landmines will save you many hours.
Hear it from the man himself
If you have a few minutes (okay, more like forty), Crockford gave a great talk at Yahoo to complement the book.
Even if you aren’t interested in reading the book, I highly recommend watching the talk if you work with JavaScript at all. It’s fascinating to hear how he got started with JavaScript and his take on the ins and outs of the language:
Not necessarily for everyone
As great as this book is, it’s not for everyone.
If you’re looking for quick tutorials, you won’t find them here. A Google search is going to get you to the finish line a lot quicker if that’s all you care about.
If you want to learn JavaScript from a blank slate, I would suggest pairing the Crockford book with another that’s geared more toward beginners. JavaScript: The Missing Manual would make an excellent companion to this book, for instance. You could technically learn JavaScript from scratch using only the Crockford book, but it would be an uphill battle.
However, if you want to learn how to take JavaScript to its limits, use its advanced features effectively, and gain a deeper understanding of this oft-misunderstood pillar of the Internet as we know it: JavaScript: The Good Parts is a must-read!
Similar posts
What do you think? Your comments are welcome.
I appreciate all of your comments, questions, and other feedback, but please try to stay on topic. If you have a question unrelated to this post, I recommend posting on the ASP.NET forums instead.
If you're replying to an existing comment, please use the threading feature. To do this, click the "Reply to this" link underneath the comment you're replying to.
3 Mentions Elsewhere
- rascunho » Blog Archive » links for 2009-02-18
- Bruno Campagnolo de Paula weblog » Resumo do dia para 2009-02-18
- 22022009 « cssguy


Thanks for your recommendations. I have been delving deeper and deeper into JavaScript and jQuery and have been looking for something to really solidify my JavaScript base knowledge.
I too am a big fan of Crockford and I strongly recommend that anyone who’s seriously wanting to get into hard-core JavaScript development check out the videos he has on YUI Theater – http://developer.yahoo.com/yui/theater/.
Start with the series “The JavaScript Programming Language” to really get a good understanding of what makes JavaScript tick and then check out the rest of his videos.
Thank you for the recommendation. I marked the video to watch in the morning and will look for the book.
Good review, and one I totally agree with. I’m reading Crockford now, as it happens. It took me two goes to get into it.
Having programmed in C, C++, and C# since 1985, JavaScript looks disarmingly similar at first glance, thanks to the C syntax. But, it turns out, JavaScript is very different, and has a whole other way of being ‘object oriented’. Crockford keeps in mind that a lot of his audience will be coming from a class-based (what he calls classical) background, and is at pains to point out the differences in JavaScript.
As for Google searching, the trouble is that there’s almost too much material on JavaScript, and little guidance on what/how/when to use what features. E.g. I was look for a substring method yesterday, and a search yielded many articles on string.substring and string.substr. But Crockford says to avoid it and use ‘slice’ instead. I’ll stick with Crockford as my primary reference. Fortunately the book is light enough to carry around.
By necessity Crockford introduces concepts before being able to fully explain them (the explanation comes a bit later), and so I would say that a newcomer like me will only get the full benefit of this book on a second full read-through. Actually I plan to read it three times.
Highy recommended!
I do exactly the same thing. It has a permanent home in one of the sleeves in my laptop bag.
I just noticed your new logo… and it is very good!
I haven’t read this book, but I am very interested now that you have talked so highly of it.
Thanks for your recommendation!
Thanks!
Great review! I’ve also just read this book and it’s really good. I’ve watched some of the videos with Crockford at YUI Theater as well. He truly is a great source of knowledge. I really like the way he explains the difference between classical inheritance and prototypal inheritance. Once you understand that, it all makes sense.
If you’ve been programming in Javascript for a while and want to get a more solid understanding of the language, this is a mandatory read.
Definitely. His explanation of it here was instrumental in my understanding of OOJS: http://www.crockford.com/javascript/private.html
I’m so happy I saw this post today. I’m in India right now work on a project and was able to pick up this book for just Rs200 (~$4)! Looking forward to reading it :)
Wow, that’s a great deal. Hope you enjoy it.
I remember Douglas Crockford himself saying that there is only one really good JavaScriopt book: JavaScript. The definite guide. by David Flanagan. (It was a couple of years ago, though. Now there is Jon Resig with his books too.)
This is the best javascript text I’ve encountered as well. Can anyone suggest a similar style book about Python?