Not a number

 | Javascript | 0 Comments
typeof(NaN) == 'number'

NaN stands for 'Not a Number' but as you can see it is a 'number' nonetheless.

null is a value that isn't anything.

undefined is a value that isn't even that.

A variable can be both defined and have a value of undefined at the same time.

boolean("0") = true

boolean("false") = true

+"42" = 42

!! produces a boolean

All of the above have been taken from the following video tutorial.

Leave a comment

Recent Entries

A walk along the Keizersgracht
Too often one is so consumed by a jungle of intertwined thoughts that the beauty of the nearby surroundings ... »
Popularity is fickle
The popularity of a given next generation technology is very fickle, and its success or failure depends on many ... »
Where was Kiffin really buried?
Hi There seems to be some confusion on the current resting place of Kiffin Rockwell, some say that his ... »
Going to Portugal
Normally the week just before I leave for summer vacation, I spend hours on end desperately searching for some ... »
A human language
These days it is not very often that a new and exciting Perl book comes along. That's why I ... »