📄️ NaN
NaN stands for "Not a Number." When a mathematical function or operation in JavaScript cannot return a specific
📄️ Infinity and -Infinity
Infinity is a property of the global object (therefore a global variable) that represents mathematical infinity. It is a
📄️ Math library functions that return NaN
Generally, Math functions that are given non-numeric arguments will return NaN.
📄️ null
null is used for representing the intentional absence of an object value and is a primitive value. Unlike undefined, it is not a property of the global object.
📄️ Number Constants
The Number constructor has some built in constants that can be useful
📄️ Operations that return NaN
Mathematical operations on values other than numbers return NaN.
📄️ Testing for NaN using isNaN()
The global function isNaN() can be used to check if a certain value or expression evaluates to NaN. This function (in short) first checks if the value is a number, if not tries to convert it (), and then checks if the resulting value is NaN. For this reason, this testing method may cause confusion*.
📄️ undefined and null
At first glance it may appear that null and undefined are basically the same, however there are subtle but