Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 2.24 KB

File metadata and controls

67 lines (55 loc) · 2.24 KB
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
devlang-javascript
language-reference
boolean_JavaScriptKeyword
JavaScript
TypeScript
DHTML
Boolean object
Boolean data type, Boolean object
d67748f2-7bf5-4889-8269-e777616cc5f0
9
mikejo5000
mikejo
ghogen

Boolean Object (JavaScript)

Creates a new Boolean value.

Syntax

  
boolObj = new Boolean([boolValue])  

Parameters

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. [!INCLUDEjavascript] implicitly uses the Boolean object whenever a Boolean data type is converted to a Boolean object.

You rarely instantiate the Boolean object explicitly.

Properties

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.

Methods

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.

Requirements

[!INCLUDEjsv2]