0
What's the use of boolean operator? where to use them and how?
4 Answers
+ 1
boolean operators: true,false
boolean operators are results of coditonal statements and they are basically used to execute a block of code based on the result of the statement.
for example:
if(5>2) // conditional statement
{
// statement block
}
result of the statement in the bracket after if is true because 5 is greater than 2. so the statement block after if will be executed. if the result would have been false then the control would skip the statement block after the if .
that's how we use boolean operators in JavaScript
0
to condition the vĂĄriable when you need to limit the answer...like input a password whit restrictions..
- 1
Boolean operators are very useful when we are working with databases especially forms
- 1
true