Latest web development tutorials

JavaScript Tutorial

JavaScript Tutorial JavaScript Introduction JavaScript usage JavaScript Output JavaScript grammar JavaScript Statement JavaScript Notes JavaScript variable JavaScript type of data JavaScript Object JavaScript function JavaScript Scope JavaScript event JavaScript The string JavaScript Operator JavaScript Comparison JavaScript If...Else JavaScript switch JavaScript for JavaScript while JavaScript Break & Continue JavaScript typeof JavaScript Type conversion JavaScript Regular Expressions JavaScript error JavaScript debugging JavaScript Variable promotion JavaScript Strict mode JavaScript Use errors JavaScript Form validation JavaScript Keep the keyword JavaScript JSON JavaScript void JavaScript Code specification

JS function

JavaScript Function definition JavaScript Function parameter JavaScript Function call JavaScript Closure


DOM Introduction DOM HTML DOM CSS DOM event DOM EventListener DOM element

JS Advanced Tutorial

JavaScript Object JavaScript Number JavaScript String JavaScript Date JavaScript Array JavaScript Boolean JavaScript Math JavaScript RegExp Object

JS Browser BOM

JavaScript Window JavaScript Window Screen JavaScript Window Location JavaScript Window History JavaScript Navigator JavaScript Pop-ups JavaScript Timing events JavaScript Cookies

JS Library

JavaScript Library JavaScript test jQuery JavaScript test Prototype

JS Examples

JavaScript Examples JavaScript Object instance JavaScript Browser object instance JavaScript HTML DOM Examples JavaScript to sum up

JS Reference Manual

JavaScript Object HTML DOM Object

JavaScript Boolean (Boolean) Object

Boolean (Boolean) object is used to convert non-Boolean value to a Boolean value (true or false).


Online examples

Check Boolean value
Check the Boolean object is true or false.

Complete Boolean (Boolean) Object Reference

We provide JavaScript Boolean Object Reference Manual , including all properties and methods that can be used in a Boolean object.

The manual contains a detailed description and relevant examples for each of the properties and methods.

Creating Boolean objects

Boolean objects represent two values: "true" or "false"

The following code defines the Boolean object called myBoolean of:

var myBoolean=new Boolean();

If no initial value of the Boolean object or its value:

  • 0
  • -0
  • null
  • ' "
  • false
  • undefined
  • NaN

Then the object is false. Otherwise, its value is true (even when the value of the string variable is "false")!