Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
JScript
Reference
Objects
Boolean Object
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
JScript .NET
Boolean Object

The Boolean object references a Boolean value.

function Boolean( [boolValue : boolean] )

Arguments

boolValue
Optional. The initial Boolean value for the new object. If boolValue is omitted, or is false, 0, null, NaN, or an empty string, the initial value of the Boolean object is false. Otherwise, the initial value is true.

Remarks

The Boolean object is a wrapper for Boolean data. The primary purposes for the Boolean object are to collect its properties into one object and to allow Boolean values to be converted into strings via the toString method. The Boolean object is similar to the boolean data type. However, they have different properties and methods.

Note   You rarely need to construct a Boolean object explicitly. The boolean data type should be used in most circumstances. Since the Boolean object interoperates with the boolean data type, all Boolean object methods and properties are available to a variable of type Boolean. For more information, see boolean Data Type.

The data type of a Boolean object is Object, not boolean.

Properties and Methods

Boolean Object Properties and Methods

Requirements

Version 2

See Also

Object Object | | Boolean Structure | new Operator | var Statement

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker