In JavaScript, dividing zero by zero (0/0) results in a special value called NaN (Not a Number). NaN is a placeholder value indicating an undefined or unrepresentable value resulting from an operation.
You can get the value of NaN by dividing zero by zero or by calling the global NaN
property:
66 chars3 lines
It is important to note that NaN is not equal to any value, including itself. To check for NaN, you can use the built-in isNaN()
function:
122 chars4 lines
gistlibby LogSnag