Comparison operators allow us to compare things.
When to use
Anytime you need to compare two or more things, use comparison operators.
Here's the main list of comparison operators:
== equal to
!= not equal
<> not equal
!== not identical
> greater than
>= greater than or equal to
< less than
<= less than or equal to
Hints & tips
- Comparison operators are used to compare things
Lesson notes are only available for subscribers.