Created
August 10, 2018 02:51
-
-
Save mildocjr/d693bb98f8a0718696213f119a6ffbc4 to your computer and use it in GitHub Desktop.
else-if-1
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
| var age: Int = 16 | |
| var ageDescription: String | |
| if age < 13 { | |
| ageDescription = "You are young." | |
| } else if age <= 18 { | |
| ageDescription = "You are a teenager." | |
| } else { | |
| ageDescription = "You are an adult." | |
| } | |
| // ageDescription is equal to "You are a teenager." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment