Reťazcové enumerácie v TypeScript

Kľúčami môžu byť nielen čísla, ale aj reťazce:

typescriptenum Season {
  Winter = 'season 1',
  Spring = 'season 2',
  Summer = 'season 3',
  Autumn = 'season 4'
};

Skontrolujeme:

typescriptlet current: Season = Season.Summer;
console.log(current); // 'season 3'
Задание 1

Vytvorte enumeráciu s názvami dní týždňa.

Задание 2

Vytvorte enumeráciu s názvami mesiacov.