Share via


Boolean Object (Windows Scripting - JScript)

 

Creates a new Boolean value.

Syntax

boolObj = new Boolean([boolValue])

Arguments

  • boolObj
    Required. The variable name to which the Boolean object is assigned.

  • 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 the Boolean data type. JScript implicitly uses the Boolean object whenever a Boolean data type is converted to a Boolean object.

You rarely call the Boolean object explicitly.

Properties

constructor Property | prototype Property

Methods

toJSON Method | toString Method | valueOf Method

Requirements

Version 2

Change History

Date

History

Reason

August 2008

Added link to toJSON.

Information enhancement.

See Also

new Operator (Windows Scripting - JScript)
var Statement (Windows Scripting - JScript)