运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Operators</h1> <h2>The typeof Operator</h2> <p>Undefined and null are equal in value but different in type:</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "<p>The typeof undefined is " + typeof undefined + "<p>The typeof null is " + typeof null + "<p>(null === undefined) is " + (null === undefined) + "<p>(null == undefined) is " + (null == undefined); </script> </body> </html>