HTML and CSS Reference
“Not a number” is used in cases where an arithmetic operation produces a result that is not
a number. Confusingly, this type is still a number .
> a = 9/undefined
> typeof a
Negative and positive infinity are also supported, and are most often generated when divid-
ing by 0:
> b = 6/0
> b == Number.POSITIVE_INFINITY
> c = -6/0
> c == Number.NEGATIVE_INFINITY
Again, most programming languages would generate errors in these scenarios if confronted
the IEEE convention for floating point numbers and returns infinity.