We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 021fc39 commit 55eb725Copy full SHA for 55eb725
lessons/logic.md
@@ -42,6 +42,13 @@ if (1 + 1 == 2 && 3 + 3 == 6) {
42
System.out.println("Math is still mathin'");
43
}
44
```
45
+Variables can be used in `if` statements as well, assuming that they are `boolean`'s.
46
+```java
47
+boolean valid = 1 == 1;
48
+if (valid) {
49
+ System.out.println("1 == 1 Yay");
50
+}
51
+```
52
```java
53
if (motorRunning && desiredMotorState == MotorState.kSTOP) {
54
motor.Set(0);
0 commit comments