JavaScript Tutorial/Global/NaN

Материал из Web эксперт
Перейти к: навигация, поиск

Global.NaN

The NaN object represents an object that is not equal to any number, including itself.

NaN stands for Not a Number.



<html>
    <body>
    <script lanuguage="JavaScript">
    <!--
    if ("a" != NaN){
         document.write("This is not a number");
    }else{
         document.write("This is a number");
    }
    -->
    </script>
    </body>
    </html>