Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>The isNaN() function returns true if the value is NaN (Not-a-Number), and false if not.</p> <p>Click the button to check whether a number is an illegal number.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var a = isNaN(123) + "<br>"; var b = isNaN(-1.23) + "<br>"; var c = isNaN(5-2) + "<br>"; var d = isNaN(0) + "<br>"; var e = isNaN("Hello") + "<br>"; var f = isNaN("2005/12/12") + "<br>"; var res = a + b + c + d + e + f; document.getElementById("demo").innerHTML = res; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_isnan by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:27:46 GMT --> </html>
Result:
Try it Yourself - © w3schools.com