Summary
My group taught this lesson as well:
Relational Operators
These are used to test the relationship between two variables. They are used for comparisons and result in a Boolean value of True or False.
x == y→ equalsx != y→ not equal tox > y→ greater thanx < y→ less thanx >= y→ greater than or equal tox <= y→ less than or equal to
Logical Operators
These are used to test multiple conditions to produce a single Boolean value.
-
AND (
&&in JavaScript,andin Python):
Returnstrueonly if both conditions are true. -
OR (
||in JavaScript,orin Python):
Returnstrueif at least one condition is true. -
NOT (
!in JavaScript,notin Python):
Reverses the Boolean value — returnstrueif condition is false, and vice versa.