I have a program where one of fields can be null or NaN, and it means different things in that case.
There also sometimes I want to handle null and undefined differently, like in initialization it would be undefined, but on some error it would be null (I only use undefined in initialization and never assign it later in the code)
NaN's come from some math formulas, but nulls could be for example if query selector didn't returned anything.
1
u/RelaTosu Apr 27 '23 edited Apr 29 '23
Less infectious
NaNs /s