The Book of JavaScript, 2nd Edition | WebReference

The Book of JavaScript, 2nd Edition

The Book of JavaScript, 2nd Edition


Cover: The Book of JavaScript
Author: thau!
Total Pages: 528
Publisher: No Starch Press
Copyright: 2006
ISBN: 1593271069

For many people, learning JavaScript can be a bit stressful. For those who know how to program other languages it's not as hard, but for those who are just beginning the process (or have done HTML and CSS design), these books can be a bit tedious. Through writing The JavaScript Diaries series I've read and reviewed many different books. Some are good and others fall into the "bit tedious" category. A few are excellent. The Book of JavaScript falls in the latter category.

This book is written by Dave Thau (aka "thau!"), who has written several tutorials over at Webmonkey. In addition, Thau has held programming positions with several different companies, including Wired Digital. I haven't read Thau's other offerings, but judging by this book, he's a natural teacher. The way Thau presents it, you're learning to code before you even realize it.

The Basics

The book is well laid out, beginning with an introduction and background on JavaScript. From there, Thau introduces the reader to variables and built-in functions, using examples that can be applied in the real world. Thau then proceeds deeper, yet ever so gently, into the realm of JavaScript programming. The topics covered include browser detection (which he uses to introduce if-then statements and OR/AND operators), window creation and manipulation, functions, arrays and loops, frames, validation, cookies, DHTML and Ajax. At the end of each chapter an assignment is given which tests the reader on the material just learned. (The answers are in the back of the book.)

The examples given aren't presented for the sake of learning. They can also be applied to real situations, making it easier to grasp and understand the concepts. The code is available on the companion site, along with images and additional resources. I would, however, recommend that you enter each example by hand to gain a better understanding of the material.

A (Small) Point of Concern

I was a bit surprised that the book included an entire chapter on browser detection, given that object detection is now the preferred method. Being concerned with the user's type and version of browser means that you need to go back and rewrite the script when new browsers and versions are brought out. In addition, even though you may detect a large assortment of browsers, you might miss many others. On the other hand, object detection ensures that the script is always current. If the browser doesn't support the object, you can provide an alternative method in the script.

The section on browser detection does provide a nice format to introduce if-then statements and OR/AND operators. However, the reader should also learn object detection as well.

Other Goodies

The book includes a resource section listing sites on the Web for additional help. In addition, a reference section is included which covers objects, functions and includes examples. The layout of this section is clear and easy to understand. This is a valuable resource, especially for beginners.


I feel this book is an excellent place to begin learning JavaScript. Thau is an excellent teacher and the presentation is clear and easy to understand. If you're interested in learning JavaScript from a book, be sure to check this one out. It'll make your task much easier. Just be careful. As I said earlier, you'll be programming before you even realize it.