In most computer programming languages, a Boolean data type is a data type with only two possible values: true or false.
By convention we can express true as the integerA natural number, a negative of a natural number, or zero. 1 and false as the integerA natural number, a negative of a natural number, or zero. 0 (zero). Please be careful as some programming languages treat an empty or unset value as FALSE.
Please know it is very common to use booleans to test for a condition. If something is TRUE then select the true option, if something is FALSE, then select the false option.
<?php $myFirstVar = True; // assign the value TRUE to $myFirstVar $myOtherVar = False; // assign the value FALSE to $myOtherVar ?>
myFirstVar = True myOtherVar = False
var myFirstVar = true; var myOtherVar = false;
Do you understand this?
- DefineGive the precise meaning of a word, phrase, concept or physical quantity. the terms: variable, constant, operator, object.