0
Apart from a conditional statement how else can we use Boolean values?
3 Réponses
+ 3
As condition in loops, also as function arguments, where boolean expression is expected.
0
Hi! the statements in the loop: while(true)
0
usually, boolean are used as 'flag', to reflect 2 states: you can use boolean for anything requiring 2 states: true/false is the most obvious, but it could be any two states that you need...
a common example is the <input type="checkbox"> (or 'radio'), wich have a boolean property 'checked' whose 2 states are checked/unchecked ;)