Switch

suggest change

Parameters

Parameter | Details |

——— | —–– |

Value to test | The variable that to compare against |

Remarks

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.

Feedback about page:

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



Table Of Contents