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 Operators</h1> <h2>The typeof Operator</h2> <p>The typeof operator returns the type of a variable or an expression.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = typeof "" + "<br>" + typeof "John" + "<br>" + typeof "John Doe"; </script> </body> </html>