Last active
June 16, 2020 17:32
-
-
Save alaboudi/e0539cd061b77a201a14faa613029102 to your computer and use it in GitHub Desktop.
traffic Light Enum
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
Enum TrafficLightColors { | |
Red, | |
Yellow, | |
Green | |
} | |
const passingTrafficLight: TrafficLightColors = TrafficLightColors.Red; // this will pass | |
const failingTrafficLight: TrafficLightColors = "green" // :( This will fail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment