Table of contents
1. Equality Operators:
\== | Equal to | This operator is used to test if two values are equal. |
!= | Not Equal to | This operator is used to test if two values are not equal. |
Example:
==
- In this example, the equality operator checks whether the value of variable
a
is equal to the value of variableb
. If the values are equal, the result istrue
; otherwise, it isfalse
.
!=
- In this example, the inequality operator checks whether the value of variable
a
is not equal to the value of variableb
. If the values are different, the result istrue
; otherwise, it isfalse
2. Relational Operators
> | Greater Than Operator | Tests if the left value is greater than the right value. |
< | Less Than Operator | Tests if the left value is less than the right value. |
\>= | Greater than or Equal to Operator | Tests if the left value is greater than or equal to the right value |
<= | Less than or Equal to Operator | Tests if the left value is less than or equal to the right value. |