Last active
December 30, 2015 14:06
-
-
Save chuck0523/2f786f89069acd1edce1 to your computer and use it in GitHub Desktop.
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
function whoDoesWhat(status, time) { | |
switch (status) { | |
case 'worker': | |
switch(time) { | |
case 'morning': | |
alert('get ready for working!'); | |
case 'evening': | |
alert('work hard!'); | |
case 'night': | |
alert('sleep well for tomorrow!'); | |
} | |
case 'student': | |
switch(time) { | |
case 'morning': | |
alert('sleep till noon...'); | |
case 'evening': | |
alert('have breakfast'); | |
case 'night': | |
alert('play video games'); | |
} | |
case 'fish': | |
switch(time) { | |
case 'morning': | |
alert('swim slowly'); | |
case 'evening': | |
alert('swim quickly'); | |
case 'night': | |
alert('swim very slowly'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment