Skip to content

Instantly share code, notes, and snippets.

@WPDC
Last active December 14, 2015 02:22
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