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

Stupid light-pole
Damn. I bashed in the left side of my car against that stupid light-pole while backing out of the ... »
Enjoy life
The man standing next to me was wearing a fancy suit and carrying a leather briefcase in his right ... »
Gale-force winds
"The true (golf) pilgrim wanders off to the outlying, the more humble and obscure courses. For it is on ... »
Secret powers
The front nine was quite a display of supernaturally and (almost) perfectly consistent golfing gusto: Par, par, par, par, ... »
No more winter greens
The cool, windy and grayish afternoon calls me onward. It's drizzling on my windshield but I do not care. ... »