As a result of the recent hubbub about web apps, I decided to get myself up to speed on JavaScript and CSS. Knowing Douglas Crockford's reputation as the JavaScript guru, I read his book, entitled JavaScript: The Good Parts.
It's a good book. The basic idea is that while JavaScript is actually a pretty cool little programming language, it has a lot of features that are best not used, and it has many outright flaws, so Crockford presents a recommended subset of the language.
The most valuable parts of the book are appendices A and B, entitled "Awful Parts" and "Bad Parts", respectively. These appendices list the gotchas of JavaScript and present rationale for leaving certain constructs out of the recommended subset.
My only gripe with the book is that, while it is presented as an introductory book, it seems to assume some previous knowledge and experience with JavaScript. I got a bit lost in some parts, particularly those regarding prototypes, the new
keyword, and how this
gets bound in various situations. (I was able to eventually figure these things out with a bit of Googling.) It also assumes some experience with functional programming, which is OK with me, but which will probably confuse a lot of introductory readers.
So, while I can enthusiastically recommend the book, I think I'd recommend it as a second JavaScript book.