Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to 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>