Control flow / Conditional statements / switch/case statements

class Tiger {
    var age = 0
}

//"where" adds a condition to the case
func describe(_ obj: Any) -> String {
    switch obj {
    case let i as Int where i > 1_000_000:
        return "Big number"
    case let s as String where s.count < 256:
        return "Short string"
    case let t as Tiger where t.age > 12:
        return "Old tiger"
    default:
        return "Unknown type"
    }
}

let tiger = Tiger()
tiger.age = 15

let result = describe(tiger)
//result is "Old tiger"

print("result is \"\(result)\"")