執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Literal Constructors</h2> <p id="demo"></p> <script> let x1 = ""; let x2 = 0; let x3 = false; const x4 = {}; const x5 = []; const x6 = /()/; const x7 = function(){}; document.getElementById("demo").innerHTML = "x1: " + typeof x1 + "<br>" + "x2: " + typeof x2 + "<br>" + "x3: " + typeof x3 + "<br>" + "x4: " + typeof x4 + "<br>" + "x5: " + typeof x5 + "<br>" + "x6: " + typeof x6 + "<br>" + "x7: " + typeof x7 + "<br>"; </script> </body> </html>