REVIEW: Eloquent JavaScript

image for 'REVIEW: Eloquent JavaScript' post

Disclaimer: the author of this book has graciously given it away for free online but please feel free to support his efforts by buying it on Amazon either in print format or Kindle format. And know that, due to my affiliate relationships, you will be putting a few bucks in my pocket also if you buy it via one of these two links.

If you’ve ever played any level of organized basketball, you know that you don’t start off learning slam dunks and behind-the-back dimes. You start by learning zone defense, the role of the two-guard, how to perfect your jump shot form and other aspects of team ball.

Simply put, you must master the fundamentals before you become a star. JavaScript is no different and Marijn Haverbeke’s Eloquent JavaScript is one of the best fundamental JS books I’ve ever read.

Eloquent JavaScript book coverEloquent takes all the basic JavaScript building blocks, variables, functions, arrays, etc., and goes into great detail on their role in JS. By doing things like pointing out that objects and arrays are how JS manages data and clarifying the role of variables (“They do not contain values, they grasp them”), the book does great job highlighting that the basics are more than just, well, basic

The book also discusses other common JavaScript concepts such as regular expressions and event handling. But it’s key to mention that it covers things that have increased in popularity over the years, dependency management, prototypal inheritance and proper namespacing in particular. The fact that it covers these three latter things highlight an important point:

Because JavaScript is a hot programming language right, and a hot skillset in the job market right now, lots of books on the subject have come out…while haven’t read all of them, I’ve read quite a few of them. Some are good, some are OK, some flat-out suck. But most focus on making JavaScript work the way that we’ve always used it: form handling cookie creation, etc.

A focus on these concepts is fine if all we’re using JavaScript for is to create websites, but we’re not. Instead, we’re using the language to create web applications, web sites with a high level of complex functionality that allow us to actually do things. Eloquent JavaScript is one of the few books that focuses on educating the reader on how to create applications and on a beginner’s level. The book’s subtitle is “A Modern Introduction to Programming” and that’s exactly what it is.

I had no problem buying the print version of the book in support of the author and have used it heavily. But it must be pointed out that the online version is updated on somewhat regular basis and does contain content not in the book. Particularly, the online version has a chapter called “Searching” which does a great job of highlighting JavaScript’s algorithmic nature. Other content unique to the online version are two appendices that are short but useful. And I do have to point out that in a few instances, not all but a few, the code samples in the book could be a little clearer: the author knew that and clarified them in the online version.

Speaking of the code samples, they’re also good and will definitely help you. Some samples send out a print command though, and, depending on your browser, will actually try to print something out on your printer. My suggestion is to substitute print for console.log() for best results: I did so using the consoles bundled in both Chrome Developer Tools and Opera Dragonfly and had no problems. The online version of Eloquent does come bundled with a custom console application where you can run code, but I found it a little buggy.

Don’t let these little things with the code samples discourage you. Eloquent JavaScript is a unique book when compared to all the JS books in the market. It will prepare you for complex JavaScript app development much better than many other books.

Would you like to Tweet this page?