The Curious Case of JavaScript NaN May 18, 2014 3 min read #api #es6 #javascript #web NaN, not a number, is a special type value used to denote an unrepresentable value. With JavaScript, NaN can cause some confusion, starting from its typeof and all to the way the comparison is handled. Several operations can lead to NaN as the result. Here are some examples (follow along on JSBin: jsbin.com/yulef
![The Curious Case of JavaScript NaN · ariya.io](https://cdn-ak-scissors.b.st-hatena.com/image/square/1abfc30410a1f4a27069437d003fc705d9a003d2/height=288;version=1;width=512/https%3A%2F%2Fariya.io%2Fimages%2F2014%2F05%2Fnan.png)