<html>
<body>
<p id="demo">Click the button to display the boolean object's value as a string.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var myvar=new Boolean(1);
var x=document.getElementById("demo");
x.innerHTML=myvar.toString();
}
</script>
</body>
</html>