You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of a bad calculation for exampe - "abc"/4.
NaN equal to ANYTHING is always false even if compared to itself.
isNaN checks if a value is NaN.
// [ Type of NaN ]typeofNaN//"number"// [ a bad calculation ]"abc"/4//NaN// [ Comparing NaN]// Even if NaN compare itself, it is false.NaN==NaN//falseNaN===NaN//falseisNaN(NaN)// true// [ How to check NaN?]isNaN("A")//true <--- Strange but it is true
Q: How to check NaN?
A: use isNaN() function because NaN == NaN is false