运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Statements</h1> <h2>The var Statement</h2> <p>You can declare many variables in one statement:</p> <p id="demo"></p> <script> var lastName = "Doe", age = 30, job = "carpenter"; document.getElementById("demo").innerHTML = "Name: " + lastName + ". Age: " + age + ". Work: " + job; </script> </body> </html>