运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript String Operators</h1> <p>Note that strings are compared alphabetically:</p> <p id="demo"></p> <script> let text1 = "20"; let text2 = "5"; let result = text1 < text2; document.getElementById("demo").innerHTML = "Is 20 less than 5? " + result; </script> </body> </html>