var action: String
var person = "hater"
if person == "hater" {
action = "hate"
} else if person == "player" {
action = "play"
} else {
action = "cruise"
}
// check whether a number is positive, negative, or 0.
let number = 0
if (number > 0) {
print("Number is positive.")
}
else if (number < 0) {
print("Number is negative")
}
else {
print("Number is 0.")
}
print("This statement is always executed")
if (condition) {
// block of code if condition is true
}
else {
// block of code if condition is false
}