Which side of the expression runs first? And when you do an
&& if the left side is
false, does it run the right side? How about an
||? If the left side is
true, does it run the right side?
In this experiment, you’ll write code that proves the order and which sides actually run for the logical operators. You’ll get some tips too.
Who needs copy/paste? Right. Writing code from scratch is fun!
Total Lab Runtime: 01:07:16
- 1 Anatomy of a Conditional Expressionfree 04:58
- 2 Falsey Conditional Expressionbasic 09:15
- 3 Functions in the Conditional Expressionbasic 11:04
- 4 Assignment in the Conditional Expressionbasic 08:42
- 5 Operator Truth Tablesbasic 05:56
- 6 Logical Operator Experimentpro 13:21
- 7 Operator Precedence Experimentpro 14:00