3 ms·
and typeof NaN == "number" is also part of the standard, it is valid to pass NaN to functions that accept numbers, and it's expected to propagate or change back
by mohbk 3y ago
and typeof NaN == "number" is also part of the standard, it is valid to pass NaN to functions that accept numbers, and it's expected to propagate or change back to normal numbers (e.g. NaN^0=1)
- marcosdumay 3y agoIf anything, JS has plenty of problems due to its too literal interpretation of NaN.