Created
November 29, 2015 08:33
-
-
Save danielctull/4c40f8a492b21ee2bb4d 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
| let integerToDescribe = 5 | |
| var description = "The number \(integerToDescribe) is" | |
| switch integerToDescribe { | |
| case 2, 3, 5, 7, 11, 13, 17, 19: | |
| description += " a prime number, and also" | |
| } | |
| description += " an integer." | |
| print(description) | |
| // prints "The number 5 is a prime number, and also an integer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment