Boolean

In computer science, a Boolean is a logical data type that can have only the values true or false.

For example, in JavaScript, Boolean conditionals are often used to decide which sections of code to execute (such as in if statements) or repeat (such as in for loops).

Below is some JavaScript pseudocode (it's not truly executable code) demonstrating this concept.

The Boolean value is named after English mathematician George Boole, who pioneered the field of mathematical logic.

Above is a general introduction. The term Boolean can have more specific meanings depending on the context. It may refer to:

Boolean (JavaScript)
A Boolean in JavaScript is a primitive value that can be either true or false.
Boolean attribute (ARIA)
A boolean attribute in ARIA is an enumerated attribute that includes true or false in the enumerated list.
Boolean attribute (HTML)
A boolean attribute in HTML is an attribute that represents true or false values. If an HTML tag contains a boolean attribute — no matter the value of that attribute — the attribute is set to true on that element. If an HTML tag does not contain the attribute, the attribute is set to false.

See also