JavaScript怪癖和秘密之NaN是数值实例页面

代码:

HTML代码:
<button id="button1">弹出 typeof(NaN)</button>
<button id="button2">弹出 (NaN === NaN)</button>
                
JS代码:
document.getElementById("button1").onclick = function() {
    alert(typeof(NaN));
};
document.getElementById("button2").onclick = function() {
    alert(NaN === NaN);
};
                

效果: