Created
January 19, 2019 23:11
-
-
Save Tombarr/cb438fe36687818ed23355a5c021009e to your computer and use it in GitHub Desktop.
Switch statement in Javascript
This file contains hidden or 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 (new Date().getDay()) { | |
case 0: | |
return "Sunday"; | |
case 1: | |
return "Monday"; | |
default: | |
return "Some other day..."; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment