Dave Ward

Subscribe to Dave Ward: eMailAlertsEmail Alerts
Get Dave Ward via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Blog Feed Post

Review: The best JavaScript book I’ve read

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
  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!


Originally posted at Encosia. If you're reading this elsewhere, come on over and see the original.

Review: The best JavaScript book I’ve read

Read the original blog entry...

More Stories By Dave Ward

Dave Ward wrote his first computer program in 1981, using good ‘ol Microsoft Color BASIC and cassette tapes for data storage. Over the years since then, he has had the opportunity to work on projects ranging from simple DOS applications to global telecommunications networks spanning multiple platforms.