JavaScript Number.NaN Property

You are Here:

JavaScript Number.NaN Property

The Number.NaN property represents Not-A-Number. Equivalent of NaN.

Note: NaN a static property of the JavaScript Number object, i.e., you can only use it as Number.NaN, not as x.NaN, where x is a number.


HTML Online Editor
<!DOCTYPE html> <html> <body> <script> var num = 25; if(num === Number.NaN) document.write("variable 'num' is NaN") else document.write("variable 'num' is not a NaN") </script> </body> </html>




Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author