Switch

suggest change

Parameters

Parameter Details
Value to test The value to compare against

Remarks

Supply a case for every possible value of the input. Use default for the values you do not want to list. The default case must be last.

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents