switch

Tests a condition against any number of case conditions, defined within "double quotes"

 

Break must be used to terminate the switch, or the next statement will be executed.

 

A default case is utilised for when no condition is met.

*note that there's no case keyword before default

Leave a Reply