⊗jstsPmEnInr 28 of 55 menu

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.

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