Switch statements allow you to control the flow of execution by testing one specific value in multiple ways. In Objective-C, and other languages, Switch statements can only be used on values that can be represented by an integer, and are most commonly used to make decisions based on enumeration cases.
As we have seen, enumerations have become a lot more powerful in Swift, as they can be based on more than just integers, and so too can switch statements.
Switch statements in Swift can be used on any type and have advanced pattern-matching functionality, as we will see.