![]() |
VOOZH | about |
JavaScript comparison operators are essential tools for checking conditions and making decisions in your code.
The Equality operator is used to compare the equality of two operands.
true true true false true false
The Inequality Operator is used to compare the inequality of two operands.
true false false false true true
The Strict equality Operator is used to compare the equality of two operands with type.
false true false false false false
The Strict inequality Operator is used to compare the inequality of two operands with type.
true false true true true true
The Greater than Operator is used to check whether the left-side value is greater than the right-side value.
true true false true
The Greater than or equal Operator is used to check whether the left side operand is greater than or equal to the right side operand.
true true true false
The Less than Operator is used to check whether the left-side value is less than the right-side value.
true false false true
The Less than or equal Operator is used to check whether the left side operand value is less than or equal to the right side operand value.
true false false true
There are many comparison operators as shown in the table with the description.
OPERATOR NAME | USAGE | OPERATION |
|---|---|---|
| Equality Operator | a == b | Compares the equality of two operators |
| Inequality Operator | a != b | Compares inequality of two operators |
| Strict Equality Operator | a === b | Compares both the value and type of the operand |
| Strict Inequality Operator | a !== b | Compares inequality with type |
| Greater than Operator | a > b | Checks if the left operator is greater than the right operator |
| Greater than or equal Operator | a >= b | Checks if the left operator is greater than or equal to the right operator |
| Less than Operator | a < b | Checks if the left operator is smaller than the right operator |
| Less than or equal Operator | a <= b | Checks if the left operator is smaller than or equal to the right operator |