First valid example of if/else statements in Swift
Forums:
if (latitude == 0) {
location = "Equator"
} else if (latitude == 90) {
location = "north Pole"
} else if (latitude == -90) {
location = "south Pole"
} else {
location = "not at the Equator or Pole"
}
- Log in to post comments