|
Variable representing true or false. |
|
Syntax: |
Syntax 1 var myBoolean = new Boolean()
Syntax 2 var myBoolean = new Boolean(booleanValue)
Syntax 3 var myArray = booleanValue
|
|
Browser support: |
Microsoft Internet Explorer: 4+ Netscape Browser: 2+ |
|
Implementations: |
JavaScript 1.1 (by Netscape) JScript 2 (by Microsoft) ECMA Script 1 (ECMA Standard) |
|
|
Example: |
Example 1 :
var myBoolean = false; alert(myBoolean);
Example 2 :
var myBoolean = false; var yourBoolean = true; if (myBoolean) alert('myBoolean is true'); if (yourBoolean) alert('yourBoolean is true');
|