diff --git a/doc/site/control-flow.markdown b/doc/site/control-flow.markdown index e1ffe218..a9a2b02e 100644 --- a/doc/site/control-flow.markdown +++ b/doc/site/control-flow.markdown @@ -61,6 +61,17 @@ if (ready) { } +You can also use `else if` branches to handle multiple possibilities. For example, what if `ready` was not a boolean value? +
+if (ready == true) {
+  System.print("go!")
+} else if (ready == false) {
+  System.print("not ready!")
+} else { // If ready isn't a boolean
+  System.print("not sure if I'm ready or not!")
+}
+
+ ## Logical operators Unlike most other [operators][] in Wren which are just a special syntax for