Booleans

Booleans

Booleans hold true/false values representing some condition. Conditions can get complex, and a boolean variable name can capture a lot of meaning more concisely than complex conditions. Therefore, assigning boolean expressions to local variables, as long as they have good names, is a powerful way to communicate intent to other programmers. There are several important considerations in crafting good boolean variable names described in the sections below:

Related content