“Secrets of the JavaScript Ninja” has four parts. Two are awesome, one was ok and one went over my head. Let's look at each section in turn.



Preparing for training

The first two chapters cover some important concepts such as how to test, log and watch out for performance problems. I'll be honest. At this point in the book, I was thinking the book was “fair.” There was important information but it was a little dry. And there was page of code without any footnotes explaining it and only a brief desc

“Secrets of the JavaScript Ninja” has four parts. Two are awesome, one was ok and one went over my head. Let's look at each section in turn.



Preparing for training

The first two chapters cover some important concepts such as how to test, log and watch out for performance problems. I'll be honest. At this point in the book, I was thinking the book was “fair.” There was important information but it was a little dry. And there was page of code without any footnotes explaining it and only a brief description after. Luckily I kept reading. Because these two chapters were like a long introduction and nothing like the rest of the book.



Apprentice training

Here the book became fun. The writing style became more vivid and the information became more interesting. The authors point out gotchas and clearly walk you through examples. The code is set up that you HAVE to understand it and not just read along. We were introduced to closures by GENTLY bringing us up to speed and I particularly liked the regular expression coverage.



Ninja training

Advanced statements were covered clearly with pros and cons. I didn't see a warning about eval being slower than other statements but I did see a warning about security implications. I liked the cross browser chapter and advice on how to deal with differences in a supported manner. And the authors didn't just say “use jQuery” which was impressive restraint given we have the creator of jQuery and author of a jQuery book writing this one.



Master training

More than I think I ever want to know about events, the DOM and CSS in JavaScript. I'm treating these chapters as a reference. I wound up skimming because I had trouble focusing on that much detail. It was still good – and if you needed to use the information – it would probably be easier to focus on.



And some overall comments – the book assumes you know the basics of Javascript, HTML and CSS. If you don't, go pick up an intro to JavaScript book before reading this one. If you are doing any non-trivial JavaScript development you need this book. And if you are developing reusable JavaScript code (used on more than a handful of pages), you need this book badly.



Note: the book has been extensively re-edited and re-written since 2008. It's a different book from what the early reviewers read



Disclosure: I received a free copy of this book from the publisher in exchange for writing a review.

