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> <p id="demo"></p> <script> // x is a string let x = "John"; // y is an object let y = new String("John"); document.getElementById("demo").innerHTML = typeof x + "<br>" + typeof y; </script> </body> </html>