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.
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(
which would be used for validation via regular expressions.