JavaScript Boolean Example

Sunny.Sagar
Posted by Sunny.Sagar under JavaScript category on | Points: 40 | Views : 345
<p>Display True / False </p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
document.getElementById("demo").innerHTML = Boolean(20 > 10);
}
</script>

Comments or Responses

Login to post response