You can check this course on my website.
Comparison operators are used to compare two operands and return bool
value (true
or false
).
- == — Equal to. If both operands are equal, returns
true
, otherwisefalse
.
- != — Not equal. If operands are not equal, returns
true
, otherwisefalse
.
- > — Greater than. Returns
true
if the first operand is greater than the second, otherwisefalse
.
- < — Less than. Returns
false
if the first operand is less than the second, otherwisetrue
.
- >= — Greater than or equal to. Returns
true
if the first operand is greater than or equal to the second, otherwisefalse
.
- <= — Less than or equal to. Returns
true
if the first operand is less than or equal to the second, otherwisefalse
.
Previous article -> 2.7 Assignment Operators
Next article -> 2.9 Logical Operators
Join to our community in Telegram — https://t.me/itifico
If you want to support me, you can buy me a cup of coffee and I will drink it when I write the next article :)
Donations list:
- Dinesh Chintalapudi — 3$
- Unknown — 5$
- Neisy — 3$
- Unknown — 3$