运行 ❯
获取您的
自己
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript String Operators</h1> <h2>The + Operator</h2> <p>The + operator concatenates (adds) strings.</p> <p id="demo"></p> <script> let text1 = "John"; let text2 = "Doe"; let text3 = text1 + " " + text2; document.getElementById("demo").innerHTML = text3; </script> </body> </html>