Why JavaScript says that a number is not a number? [duplicate]

As I understand it, NaN is a sentinel instance of the Number class that represents, well, exactly what it stands for – numeric results that cannot be adequately represented. So 0/0 is not a number, in the sense that it’s NaN, but it is a Number in terms of its type.

Perhaps it should have been called NaRN (Not a Representable Number).

Leave a Comment