Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
balte24993yI was talking about this with a colleague and comparison to NaN should always result to false.
edit: realised you weren't doing comparison at all.
fdgram5253yIt's not stupid. NaN is part of the number type specified in IEEE 754. Otherwise it wouldn't be possible, in languages with types, to specify that something is invalid/not a number/infinity/etc without another variable or flag.
Wiciaki9223yNaN == NaN is false
fuck this language
Crazed21563yMy desktop background just says "typeof(NaN) is the reason I have trust issues"
Everything presented to you is not what it seems.
Keep that in mind and you won't miss the required checks.
Encapsulation by clever use of closures.
Arrays are lists.
Polymorphism and type casting.