Introduction to Boolean Data Types

Learn more about Boolean data types in JavaScript.

We'll cover the following

Previously, we looked at the primitive values of strings and numbers. Now let’s take a closer look at Booleans, another primitive data type, and find out how we can use them to control the flow of a program.


Recall that Booleans are one of the primitive data types used by programming languages. There are only two Boolean values, true and false. They’re named after George Boole, an English mathematician who worked in the field of algebraic logic. Boolean values are fundamental in the logical statements that make up a computer program.

Get hands-on with 1200+ tech skills courses.