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 Strings</h1> <h2>The startsWith() Method</h2> <p id="demo"></p> <p>The startsWith() method is not supported in Internet Explorer.</p> <script> let text = "Hello world, welcome to the universe."; document.getElementById("demo").innerHTML = text.startsWith("world"); </script> </body> </html>