1. Computing

Eloquent JavaScript

About.com Rating 4.5 Star Rating

By

The Bottom Line

This book takes a different approach to teaching JavaScript to beginners and by doing so manages to cover a large portion of the language very thoroughly in a relatively small book.
<!--#echo encoding="none" var="lcp" -->

Pros

  • Simplifies a lot of the explanations by not introducing HTML until near the end of the book.
  • Explains efficiency aspects of different coding techniques.
  • The only book I have seen to properly explain the use of finally with exception handling.
  • Easy to follow explanations including even some of the more advanced JavaScript concepts.

Cons

  • Domonstrates some features that are considered to be poor coding techniques.
  • Defines undefined and null backwards. If a variable doesn't exist it is null.
  • Suggests using i for a loop variable comes from laziness whereas it really comes from Fortran.

Description

  • First Edition: 2011
  • 205 page paperback
  • Published by No Starch Press
  • ISBN: 978-1-59327-282-1
  • A Modern Introduction to Programming
  • Author: Marijn Haverbeke

Guide Review - Eloquent JavaScript

One advantage to knowing more than one programming language is being able to apply what you know about one language and apply it to another language in order to achieve something that someone who only knows that language is unlikely to think of. In this book the author has done that in their approach to teaching JavaScript in a very different way to that taken by other introductory books on JavaScript. This approach means that this book can teach far more JavaScript in a much shorter space and even cover relatively advanced concepts.

The biggest way in which the book differs from the more conventional approach is that it doesn't start with the assumption that the script will run in a web browser. All the basics that don't depend on a web browser are taught first using a generic print() function that is assumed to output the results. This allows the author to avoid the document.write statement that ought to never be used any more in JavaScript without having to explain how the DOM works in order to do it the right way.

Another way in which this book differs from other JavaScript books is that it doesn't try to teach every single JavaScript command. Instead it teaches the concepts. There is sufficient explanation in each chapter for the reader to learn how to apply that particular concept. To use all the other commands that use that same concept the reader just needs a JavaScript reference to look up the alternatives. By covering just the concepts rather than all the alternatives the book can cover far more concepts and so is able to introduce even the more advanced concepts that many introductory JavaScript books avoid. As the author knows other programming languages the book also explains how JavaScript differs from other languages when the way JavaScript implements a concept differs from the way other languages do it. This makes the book not just useful for beginners with no programming background but also makes it very useful for those learning JavaScript who already know other languages. That the book covers some of the more advanced concepts means that even those who already know some JavaScript can use the book to improve their knowledge of JavaScript.

While this book does contain a few flaws, those that I noticed were extremely trivial and would not impact at all on someone being able to learn how to program JavaScript properly by using this book. While there are a few spots where somewhat dated coding is used (eg prompt and alert) the way in which the book teaches concepts means that the reader is more likely than not to explore further to find the more modern replacements.

For those considering learning JavaScript whether as a beginner to programming or as someone who already knows one or more other languages this book is a good place to start.

<!--#echo encoding="none" var="lcp" -->
Disclosure: A review copy was provided by the publisher. For more information, please see our Ethics Policy.
  1. About.com
  2. Computing
  3. JavaScript
  4. Reference
  5. Reviews
  6. JavaScript Books
  7. Eloquent JavaScript

©2014 About.com. All rights reserved.