You piqued my curiosity. I downloaded all the code for the book and did a scan for "
NaN" (case sensitive).
The ONLY place it appears is in code from Chapter 12. And it looks to me like in there, even, the only place it appears is in the various libraries. Such as jquery, MochiKit, scriptaculous, etc.
I agree, this is a little disappointing. I would have expected a book that discusses HTML and JavaScript to have, for example, some basic examples of form validation, including of course the use of parseFloat() and/or parseInt().
Okay, so do a search for
parseFloat. Same results.
Even a search for the word
function shows very few results outside of chapter 12, and not a one of those that seems to do validation of numeric input. Same with searches for
match( and
test( which would be used for validation via regular expressions.
Somehow, it doesn't look like this is the book to learn JavaScript from. Might be fine for HTML and CSS, but clearly it doesn't address JavaScript development, at all. Looks like all it does is show you how to use some of the various libraries. Yes?
Okay, finally looked at the Table of Contents. No, this is definitely not a book for learning JavaScript. A few fundamentals in a few pages, and that's all. Can't comment on the HTML and CSS, though the ToC looks like they are covered fairly well. Esp. in comparison to the
JS coverage.