<!DOCTYPE html>
<html>
<body>
<p>Click the button to display a boolean value as a string.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var bool = true;
var x = bool.toString()
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>