let n = 7 // classic if / else if n % 2 == 0 { print("even") } else { print("odd") } // the ternary picks one of two values let sign = n >= 0 ? "positive" : "negative" print(sign)
branching and the ?: operator