Re:JavaScript Is Weird
by mohbk on Sunday August 13, 2023 @12:22PM
(#37111353)
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)
[ Parent
| on HN ]
Re:JavaScript Is Weird
by marcosdumay on Sunday August 13, 2023 @12:57PM
(#37111707)
If anything, JS has plenty of problems due to its too literal interpretation of NaN.