NaN means:
N → Not
A → A
N → Number
It appears in computing when the program attempts a calculation that shouldn't result in a number
Examples🤠
• x ÷ 0 = NaN
Explanation: x ÷ 0 = ∞, Infinity is not a number; it is the concept of "without end"
Explanation of the explanation🗣️🔥🔥: The most basic way to define division is "How many y's fit inside the number x", and there are infinitely many zeros that fit inside any x
• √-1 = NaN (Correct)🗣️🔥
The square root of -1 was not defined because it didn't make sense, and so imaginary numbers (i) emerged, which somewhat resolved this issue, which is why √-1 = i
The second way it can appear is when you try to convert text to a value
Example: Converting "Sun" to a value is invalid and it's not a number, therefore, = NaN