The Boolean object is used to convert a non-Boolean value to a Boolean value (true or false).
Check Boolean value
Check if a Boolean object is true or false.
For a complete reference of all the properties and methods that can be used with the Boolean object, go to our complete Boolean object reference.
The reference contains a brief description and examples of use for each property and method!
The Boolean object represents two values: "true" or "false".
The following code creates a Boolean object called myBoolean:
If the Boolean object has no initial value, or if the passed value is one of the following:
the object is set to false. For any other value it is set to true (even with the string "false")!
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.