Write a Switch-Case statement

 Problem

I have a list of different conditions and want to write a Switch-Case statement.



 Recipe



let name = "John"

switch name {
    // List the different cases
    // - no "break" needed
    
    case "John" : print("Hello John!")
    case "Jane" : print("Hello Jane!")
    default     : print("Hello!")
}

				


 Playground