TypeScript Enums

it is a way of defining group of named constant. it is used for improve code readability .

Syntax:

example code:

output would be : 1

By default, enums are assigned incremental numeric values starting from 0.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top