Boolean

A Boolean is a data type that has two possible values: true or false. It is named after the mathematician George Boole, who developed the algebraic system of logic that is now the basis of Boolean algebra. In programming, Booleans are used to represent the truth values of logic statements and control the flow of programs through conditional statements and loops.

Examples:

// JavaScript
let isUserLoggedIn = true;
let hasPaidSubscription = false;

if (isUserLoggedIn && hasPaidSubscription) {
  console.log("Access granted to premium content.");
} else {
  console.log("Access denied.");
}

Booleans are fundamental to controlling program logic, enabling the implementation of decision-making processes within software applications.