Path: blob/main/files/en-us/glossary/boolean/index.md
6538 views
------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:
{{GlossaryDisambiguation}}
See also
Boolean on Wikipedia