Skip to content

Instantly share code, notes, and snippets.

@mildocjr
Created August 10, 2018 02:51
Show Gist options
  • Select an option

  • Save mildocjr/d693bb98f8a0718696213f119a6ffbc4 to your computer and use it in GitHub Desktop.

Select an option

Save mildocjr/d693bb98f8a0718696213f119a6ffbc4 to your computer and use it in GitHub Desktop.
else-if-1
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