Home
<!DOCTYPE html> <html> <body> <h1>Demo: JavaScript Boolean</h1> <p id="p1">b1 = </p> <p id="p2">b2 = </p> <script> var b1 = new Boolean(true); var b2 = true; document.getElementById("p1").textContent += typeof b1; document.getElementById("p2").textContent += typeof b2; </script> </body> </html>
Result: