let fruit = "apple" switch fruit { case "apple": print("An apple a day...") case "banana": print("Great source of potassium") default: print("Unknown fruit") } // Prints: An apple a day...
Click Run to execute this code.