JavaScript Boolean Reference
JavaScript Booleans
JavaScript booleans can have one of two values: true
or
false
.
The Boolean() Function
You can use the Boolean()
function to find out if an expression is
true:
Or even easier:
(10 > 9)
Try it Yourself »
See Also:
JavaScript Boolean Methods and Properties
Name | Description |
---|---|
constructor | Returns the function that created JavaScript's Boolean prototype |
prototype | Allows you to add properties and methods to the Boolean prototype |
toString() | Converts a boolean value to a string, and returns the result |
valueOf() | Returns the primitive value of a boolean |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.