Boolean
A Boolean object is used to convert a non-Boolean value to a Boolean value (true or false).
var bool = new Boolean();
Boolean Properties
|
Property |
Description |
|---|---|
|
constructor |
Returns the function that created the Boolean object's prototype. |
|
prototype |
Allows you to add properties and methods to an Boolean object. |
Boolean Methods
|
Method |
Description |
|---|---|
|
toString() |
Converts a Boolean value to a string, and returns the result (either “true” or ”false”).
|
|
valueOf() |
Returns the primitive value of a Boolean object (either true or false).
|