<html>
<body>
<p>把 NaN 转换为其他类型:</p>
<p id="demo" style="font-family:courier"></p>
<script>
var x = NaN;
document.getElementById("demo").innerHTML =
"Number : " + Number(x) + "<br>" +
"String : " + String(x) + "<br>" +
"Boolean: " + Boolean(x);
</script>
</body>
</html>