Answers for "if else if and else statments in swift language"

0

if else if and else statments in swift language

var action: String
var person = "hater"

if person == "hater" {
    action = "hate"
} else if person == "player" {
    action = "play"
} else {
    action = "cruise"
}
Posted by: Guest on February-24-2022

Code answers related to "Swift"

Browse Popular Code Answers by Language