W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h2>JavaScript 数据类型</h2> <p>空的字符串变量既有值也有类型。</p> <p id="demo"></p> <script> var car = ""; document.getElementById("demo").innerHTML = "其值是:" + car + "<br>" + "类型是:" + typeof car; </script> </body> </html>