-
-
Save WPDC/9e5e7f107077fbab86b1 to your computer and use it in GitHub Desktop.
CS0110 3.4 - Conversion to switch/case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch ( weatherCondition ) | |
case 'sunny': | |
go for a walk | |
break; | |
case 'raining': | |
dance in the rain | |
break; | |
case 'foggy': | |
sound the fog horn | |
break; | |
case 'snowing': | |
build a snowman | |
break; | |
default: | |
read a book |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment