執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 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>