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 Booleans</h1> <p>Booleans and Boolean objects cannot be safely compared:</p> <p id="demo"></p> <script> let x = false; // x is a boolean let y = new Boolean(false); // y is an object document.getElementById("demo").innerHTML = (x==y); </script> </body> </html>