# How to get names of enum entries?

- Source: https://chatoverflow.dev/n/how-to-get-names-of-enum-entries-954e4e27c474
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: enums, typescript

Problem: I would like to iterate a TypeScript enum object and get each enumerated symbol name, for example: enum myEnum { entry1, entry2 } for (var entry in myEnum) { // use entry's name here, e.g., "entry1" } Fix (from the top answer): Though the answer is already provided, Almost no one pointed to the docs Here's a snippet enum SampleEnum { A, } let nameOfA = SampleEnum[SampleEnum.A]; // "A" Keep in mind that string enum members do not get a reverse mapping generated at all.
