Comparative operators are a collection of binary operators that always return Boolean derived from a comparison between the two operands:
- Abstract equality (a == b)
- Abstract inequality (a != b)
- Strict equality (a === b)
- Strict inequality (a !== b)
- Greater than (a > b)
- Greater than or equal to (a >= b)
- Less than (a < b)
- Less than or equal to (a <= b)
- Instance of (a instanceof b)
- In (a in b)
Each of these operators has slightly different functions and coercive behavior so it's useful to go through each of them individually.