Booleans

Now we'll learn about the boolean data type.

We'll cover the following

Definition

The Boolean, or bool, data type can have either true or false as a value.

A Boolean is typically used to indicate whether the logic of an expression is true or false. In bit value terms, true is considered as 1, whereas false is 0.

Get hands-on with 1400+ tech skills courses.