Created
December 1, 2017 21:22
-
-
Save jazzedge/d89bee85eb698b06605831bc43ec370e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The guard statement means "if the condition(s) are NOT met then do this" | |
The else basically means DO THIS if the condition is NOT met | |
So if x is not > 0 then the code in { ... } IS executed. | |
guard x > 0 else { | |
// Value requirements not met, do something | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment