+ 1
Comparison operators
What’s the difference between comparison operators and a Boolean
2 odpowiedzi
+ 2
boolean is just True or False. With comparison operators you compare two variables which result is boolean. For example
var a = 3;
var b = 4;
b > a will return true
b == a will return false
b < a will return false
b != a will return true
0
Boolean only has 2 values: true or false. comparison operators are those like equal to(=), greater than(>), less than(<), less than or equal to(<=) and greater than or equal to(>=). sorry if this doesn't help because it's only a definition. also pls add if i forgot any comparison operators.