Swift Language Switch


Value to testThe variable that to compare against


Supply a case for every possible value of your input. Use a default case to cover remaining input values you don't want to specify. The default case must be the last case.

By default Switches in Swift will not continue to check other cases after a case has been matched.