NaN !== NaN in JavaScript is not a bug but follows the IEEE-754 floating-point standard. NaN represents an unknown or invalid result, not a specific value, so two NaN values cannot be proven equal. This behavior exists across many languages including Java, Python, Rust, and C/C++. To check for NaN, use Number.isNaN() instead of

Sort: