Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
There are reasons for that check out stack overflow.
And the first 2 operations are painfully obvious.
For later 2 DDG is there why not use it. -
mrsulfat2937y@TylerDDevRant you use it in a function that has to return a number as a signal that the function failed/ not able to produce a number!
-
@mrsulfat
And that's the daily JS mindfuck mindset.
The creators of JS are some very unique flowers... -
Bullshit_rant_about_absultely_fine_as intended_js_functionality_by_noob_who doesn't_understand_what_it_does_#2340652
For a simple example.
Sqft(-1) and sqrt(-2) are both nan. Obviously not equal.
typeof(nan) doesn't make a lick of sense to compare, because it's the type of a prototype. Not a value. -
sSam14837yI don't know anything about JS, but this makes perfect sense. Just learn about floating points please...
-
inaba45896y@TylerDDevRant the reason NaN is a number and not equal to itself is still and remains because of IEEE756 which is the floating point specification JS uses.
And good lord, the reason !isNaN(NaN) returns false should be painfully obvious my dude
Related Rants
NaN logic
joke/meme
dafuq
ohnoitsretarded
logic