Comparison operators

Comparison operators

Comparison operators are binary operators that test a condition and return 1 if that condition is logically true and 0 if that condition is false..

Operator Operator name Example Description
== equal to a == b a is equal to b
!= not equal to a != b a is not equal to b
< less than a < b a is less than b
> greater than a >