|
JavaScript Boolean Object Reference
The Boolean Object
The Boolean object represents two values: "true" or "false".
Syntax for creating a Boolean object:
|
var myBool=new Boolean(value)
|
Note: If the value parameter is omitted, or is 0, -0, null, "", false,
undefined, or NaN, the object is set to false. Otherwise it is set to true (even
with the string "false")!
Boolean Object Properties
FF: Firefox, IE: Internet Explorer
| Property |
Description |
FF |
IE |
| constructor |
Returns a reference to the Boolean function that created the object |
1 |
4 |
| prototype |
Allows you to add properties and methods to the object |
1 |
4 |
Boolean Object Methods
| Method |
Description |
FF |
IE |
| toSource() |
Returns the source code of the object |
1 |
- |
| toString() |
Converts a Boolean value to a string and returns the result |
1 |
4 |
| valueOf() |
Returns the primitive value of a
Boolean object |
1 |
4 |

The Altova MissionKit, recent winner of the Jolt Product Excellence and Productivity Award for Best Development Environment,
is an integrated suite of tools ideal for:
- XML development
- Web & Web services development
- Data mapping & integration
- Rendering & publishing XML & database data
- XBRL validation, taxonomy editing, transformation & rendering
The MissionKit for XML Developers includes XMLSpy®, MapForce®, and StyleVision® plus 3 additional tools for less than the price of 2.
Try all 6 products free for 30 days!
Download a fully-functional free trial
|
|
|
|