Extra condition checking


#1

After failing the condition population < 10000, the condition population >= 10000 is always true.

var population: Int = 5422
var message: String

if population < 10000 {
  message = "\(population) is a small town!"
//} else if population >= 10000 && population < 50000 {
} else if population < 50000 {
  message = "\(population) is a medium town!"
}  else {
  message = "\(population) is pretty big!"
}
print(message)