Skip to content

Instantly share code, notes, and snippets.

@WPDC
Last active Dec 14, 2015
Embed
What would you like to do?
CS0110 3.4 - Conversion to switch/case
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