Global NaN Property - Javascript Global

Javascript examples for Global:NaN

Description

The NaN property represents "Not-a-Number" value, which is the same as the Number.Nan property.

Return Value:

NaN

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {//from  w ww . j  av  a 2s  .c  om
    document.getElementById("demo").innerHTML = NaN;
}
</script>

</body>
</html>

Related Tutorials