The comparison operators are used to determine the relationship, in terms of equality or rank, between the values of two operands. A true, false, or invalid is returned, depending on the results of the comparison. A true signifies that the comparison was successful. A false signifies that the comparison failed. An invalid signifies that at least one of the operands is of invalid type.
These operators are commonly used in test conditions in if and while statements.
This operator uses the following format:
operand1 operator operand2
There are certain rules that are obeyed when making a comparison: