Testing the isFinite
function I see that NaN
is an infinite number (even if it's not a number :-)
).
isFinite(NaN) // returns false
What's the logic behind this? Why isn't NaN
finite?
As Dave Newton said, NaN is not a number, and then you have to consider that it isn't finite nor infinite. The same occurs to these:
NaN > 0 // false
NaN < 0 // false
You might want to read these articles:
Because it is not a numeric value...and finite/infinite is applicable only to numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With