11 KiB
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Boolean - Glossary | MDN | 1/3 | https://developer.mozilla.org/en-US/docs/Glossary/Boolean | reference | web, html, css, javascript, documentation | 2026-05-05T05:25:27.720794+00:00 | kb-cron |
MDN HTML HTML: Markup language
HTML reference
HTML guides
Markup languages
CSS reference
CSS guides
Layout cookbook
JavaScriptJS JavaScript: Scripting language
JS reference
JS guides
Web APIs Web APIs: Programming interfaces
Web API reference
Web API guides
- Using the Web animation API
- Using the Fetch API
- Working with the History API
- Using the Web speech API
- Using web workers
Technologies
Topics
Learn Learn web development
Frontend developer course
- Getting started modules
- Core modules
- MDN Curriculum
- Check out the video course from Scrimba, our partner
Learn HTML
Learn CSS
Learn JavaScript
Tools Discover our tools
About Get to know MDN better
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.
In this article
See also
- Boolean on Wikipedia