Enums in TypeScript
Enumerations are a convenient way to create sets of values whose number and names are known in advance and should not change. The enum
keyword is used to create enumerations.
Let's create an enumeration containing the names of the seasons:
enum Season { Winter, Spring, Summer, Autumn };
In the following lessons we will look in more detail at all the operations that can be performed with enumerations.
Make an enumeration containing the days of the week.