What do you think?
Rate this book
153 pages, Paperback
First published January 1, 2008
undefined and NaN are not constants. They are global variables, and you can change their values. That should not be possible, and yet it is. Don't do it.Any developer who has ever written Javascript is likely to have been confounded by a number of its pitfalls, and in many cases I think one's first instinct is to assume that you've done something wrong. Crockford clarifies that Javascript's heritage as the language of the web browser gives it a number of unique deformities, and he labels them as such pretty unambiguously. I like that. Honesty makes it easier for developers to move forward and write better code.
JavaScript is most despised because it isn’t some other language. If you are good in some other language and you have to program in an environment that only supports JavaScript, then you are forced to use JavaScript, and that is annoying. Most people in that situation don’t even bother to learn JavaScript first, and then they are surprised when JavaScript turns out to have significant differences from the some other language they would rather be using, and that those differences matter.