枚举类型是一种独特的值类型,它用于声明一组具有相同类型的常量。
1: enum Week
2: {
3: Sunday = 0,
4: Monday = 1,
5: Tuesday = 2,
6: Wednesday = 3,
7: Thursday = 4,
8: Friday = 5,
9: Saturday = 6
10: }