Created
February 13, 2019 07:02
-
-
Save GeeWee/7e22f631e1f4d6f442a4f59d249c1927 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
// This is the const enum. Notice the const in front. | |
const enum FRUITS { | |
APPLE = 'APPLE', | |
PEAR = 'PEAR', | |
} | |
if (someString === FRUITS.APPLE){ | |
console.log("This is an apple!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment