⊗jstsPmEnSt 34 of 55 menu

String Enums in TypeScript

Keys can be not only numbers, but also strings:

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

Let's check:

let current: Season = Season.Summer; console.log(current); // 'season 3'

Make a list with the names of the days of the week.

Make a list with the names of the months.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline