+ 1

Comparison operators

What’s the difference between comparison operators and a Boolean

11th Apr 2018, 3:44 PM
sean
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
11th Apr 2018, 4:00 PM
Damyan Petkov
Damyan Petkov - avatar
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.
11th Apr 2018, 3:57 PM
[Adenosine]
[Adenosine] - avatar