javascript check if number is not nan or undefined code example Example: javascript check if is nan function isNaN(x) { return x !== x; }; isNaN(NaN);//true