Why isn't NaN finite?

后端 未结 5 631
萌比男神i
萌比男神i 2021-01-13 17:34

Testing the isFinite function I see that NaN is an infinite number (even if it\'s not a number :-)).

5条回答
  •  悲&欢浪女
    2021-01-13 17:42

    Finite means capable of being counted. It has to return true or false for isFinite. I think it makes more sense for NaN to be infinite.

提交回复
热议问题