ES6-ブール値
ブールオブジェクトは、2つの値を表します。 "true" または "false"。valueパラメータが省略されているか、0、-0、null、false、NaN、undefined、または空の文字列( "")の場合、オブジェクトの初期値はfalseです。
次の構文を使用して、 boolean object。
var val = new Boolean(value);
ブールプロパティ
以下は、ブールオブジェクトのプロパティのリストです。
| シニア番号 | プロパティと説明 | 
|---|---|
| 1 | constructor
 Returns a reference to the Boolean function that created the object.  | 
| 2 | prototype
 The prototype property allows you to add properties and methods to an object.  | 
Boolean Methods
Following is a list of the methods of Boolean object and their description.
| Sr.No | Method & Description | 
|---|---|
| 1 | 
toSource()
 Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.  | 
| 2 | 
toString()
 Returns a string of either "true" or "false" depending upon the value of the object.  | 
| 3 | 
valueOf()
 Returns the primitive value of the Boolean object.  | 
In the following sections, we will take a look at a few examples to demonstrate the usage of the Boolean methods.