JavaScript Tutorial

R4R® JavaScript
(追記) (追記ここまで)
(追記) (追記ここまで)
Boolean In JavaScript

A JavaScript use Boolean to represents one of two values i.e true or false.

A boolean program which return true value.

Example :

<html>
<body>
<p>Display the value of 20 > 10</p>
<button onclick="myFunction()">button it</button>
<p id="demo"></p>
<script>
function myFunction() {
 document.getElementById("demo").innerHTML = 20 > 10;
}
</script>
</body>
</html>

Output :

true

(追記) (追記ここまで)

A boolean program which return false value.

Example :

<html>
<body>
<p>Display the value of 20 > 50</p>
<button onclick="myFunction()">button</button>
<p id="demo"></p>
<script>
function myFunction() {
 document.getElementById("demo").innerHTML = 20 > 50;
}
</script>
</body>
</html>

Output :

false

(追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /