运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>Common JavaScript Mistakes</h2> <p>Adding a number as a number produces a different result from adding a number as a string:</p> <p id="demo"></p> <script> let x = 10; let y = "5"; let z = x + y; document.getElementById("demo").innerHTML = z; </script> </body> </html>