And, or, not
Sometimes one test isn't enough. Logical operators let you combine true/false values:
a && b— and: true only when both sides are truea || b— or: true when either side is true!a— not: flips true to false and false to true
Read x > 0 && x < 100 as *“x is greater than 0 and less than 100.”* That's how you check whether a value sits inside a range.
&& vs &
Use two symbols: && for and, || for or. A single & or | is a different (rarely-used) operator.