False

Updated: 02/07/2022 by Computer Hope
True and False written on a chalkboard, with red X next to False.

In programming, false is a boolean value returned when a logical statement is false (as opposed to true). For example, checking whether two values are equal by running one block of code when true and another if it's not true. Below, is an example of some JavaScript code as an example.

var x = 2;
var y = 2;
if (x === y) {
 window.alert("x equal to y is true");
}
else {
 window.alert("x equal to y is not true");
}

In this code, if x equals y, the user receives an alert that says "x equal to y is true." If it is false, the user receives an alert that says "x equal to y is false."

Boolean, Condition, Invalid, Programming terms, True