| Comparison Operators |
| Operator |
Description |
1.3 |
Example |
| == |
Equal to. This will try to convert operands to
similar types and compare if they are of different
types.
|
|
|
| != |
Not equal to. This will try to convert operands to
similar types and compare if they are of different
types.
|
|
|
| === |
Strict equal to. This will return true only if the
operands' types are the same and their values are
equal to each other.
|
x |
|
| !== |
Strict not equal to. This will return true if
the operands' types are not the same or their values
are not equal to each other.
|
x |
|
| > |
Greater than. JavaScript will try and convert to
similar types for the comparison.
|
|
 |
| >= |
Greater than or equal to. JavaScript will try and convert to
similar types for the comparison.
|
|
|
| < |
Less than. JavaScript will try and convert to
similar types for the comparison.
|
|
 |
| <= |
Less than or equal to. JavaScript will try and convert to
similar types for the comparison.
|
|
|
| Logic Operators |
| && |
Logical AND. Returns true if both operands are true.
|
|
|
| || |
Logical OR. Returns true if either or both operands are true.
|
|
|
| ! |
Logical NOT. Returns the opposite Boolean value for the operand.
|
|
|