Last active
June 26, 2019 17:32
-
-
Save danielkellyio/9aff7d479694d3a8174d1c18fa904616 to your computer and use it in GitHub Desktop.
Another bad way to set a variable based on multiple conditions
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
let friendly_timezone; | |
switch( tz_timezone ) { | |
case 'America/New_York': | |
friendly_timezone = 'Eastern'; | |
break; | |
case 'America/Chicago': | |
friendly_timezone = 'Central'; | |
break; | |
case 'America/Denver': | |
friendly_timezone = 'Mountain'; | |
break; | |
case 'America/Los_Angeles': | |
friendly_timezone = 'Pacific'; | |
break; | |
default: | |
friendly_timezone = 'No Timezone Specified'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment