| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Boolean Object (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
|
|
d67748f2-7bf5-4889-8269-e777616cc5f0 |
9 |
mikejo5000 |
mikejo |
ghogen |
Creates a new Boolean value.
boolObj = new Boolean([boolValue])
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.
The Boolean object is a wrapper for the Boolean data type. [!INCLUDEjavascript] implicitly uses the Boolean object whenever a Boolean data type is converted to a Boolean object.
You rarely instantiate the Boolean object explicitly.
The following table lists the properties of the Boolean object.
| Property | Description |
|---|---|
| constructor Property | Specifies the function that creates a Boolean. |
| prototype Property | Returns a reference to the prototype for a Boolean. |
The following table lists the methods of the Boolean object.
| Method | Description |
|---|---|
| toString Method | Returns a string representation of a Boolean. |
| valueOf Method | Gets a reference to the Boolean. |
[!INCLUDEjsv2]