andrewzigler.com

Review: Eloquent JavaScript

January 16, 2018 12:31 AM

by Andrew Zigler

3 min read

Category

Review

Tags

I’m always looking to expand my knowledge of programming, especially JavaScript. In recent years, JavaScript has become my favorite and most productive language. I’ve pieced together my understanding of the language through tutorials, books, courses, and a few good mentors. Within the JS community, many people have been waxing poetic about Marijn Haverbeke‘s Eloquent JavaScript, so last year I started working through the book online. At the time, I had a strong foundation of JavaScript basics, but was looking for projects and exercises for practice.

The book starts out at an excellent and gracious pace. Every paragraph was like upturning a stone and discovering functionality I suspected was there the whole time, but could only barely not see. Eloquent Javascript portrays these concepts via impressively brief code samples. The introduction and first six chapters are informative and wield a high degree of clarity. Haverbeke’s love for his craft invites the reader to learn efficient and beautiful syntax for both arrays and methods. Arming the reader with these new tools, the book shines in Chapter 7’s Electronic Life exercise, which illustrates how to create a basic but extensible simulation. Moments like this impart a sensation of genius from behind the page, and the book truly inspires as a result.

The beauty of this book is its simplicity and brevity. In just 21 chapters (22 if you own the print version) Haverbeke carries you from JavaScript infancy to building a Node.js server web server and client from scratch. In this journey, you’ll work almost solely with built-in JavaScript capabilities to really unlock the core potential of the language. As a result, this book doesn’t expose you to any useful libraries. Instead, it shows you how these libraries might work “under the hood” so you can make smarter design decisions for your programs. jQuery and AJAX aren’t even mentioned as the author confidently carries the reader through manipulating the DOM and making HTTP requests.

But even with all of this said, I wouldn’t recommend this book for someone just starting with the language.

Unfortunately, unless the reader is already coming from a programming background, the wisdom of this book will evaporate off of the page before its found. For every tricky and Byzantine fact the book teaches you, there’s less space and focus on rudimentary programming concepts and approaches. As a result, I frequently found myself flipping back to the earlier chapters to review a shorthand or efficient syntax used again later on. The book assumes each concept is mastered instantly and builds on prior knowledge rapidly. If the reader doesn’t grasp each concept when it’s introduced, burnout could easily happen midway through the book.

And since it positions itself as an introductory book to the language, those problems above make it hard for me to recommend this book to a total JS newbie.

All of that said, this is still an excellent text and I recommend it for those with a basic grasp of JavaScript. One of the best parts about the book is that the author has very graciously made it available online for free.

Check out Eloquent JavaScript‘s online code sandbox, where you can test code and view solutions as you work through the book’s exercises.

You can follow the author on Twitter: @MarijnJH

You can support the author by buying the second edition of Eloquent JavaScript, which comes with a bonus chapter.

If you’d like a downloadable version of the text, the author also provides the entire book as a PDF.