We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d7bb0c commit 04a1d82Copy full SHA for 04a1d82
1 file changed
docs/reference.md
@@ -668,6 +668,17 @@ else
668
print message -- prints: I am very tall
669
```
670
671
+The opposite of `if` is `unless`:
672
+
673
+```moon
674
+unless os.date("%A") == "Monday"
675
+ print "it is not Monday!"
676
+```
677
678
679
+print "You're lucky!" unless math.random! > 0.1
680
681
682
### With Assignment
683
684
`if` and `elseif` blocks can take an assignment in place of a conditional
0 commit comments