Home›Learn›TypeScript›Enums
TypeScript Master CourseBeginner Friendly

Enums

Learn Enums with simple explanations, practical examples, interview questions, MCQs and hands-on practice.

📘 Chapter 12 / 25⏱️ 8–10 Min Read🎯 Beginner Friendly
Course Progress48%

Course Progress

48%

12 / 25 chapters

📖

Theory

Understand the concept step by step

Enums allow you to define a collection of named values. They can make code easier to read when a variable should contain one of a predefined set of values.
💻

Example

See how the concept works in real code

TypeScript
enum Role {
  Admin,
  User,
  Guest,
}

let role: Role = Role.Admin;

console.log(role);
📤

Output

Understand what the code produces

0

📝

Practice

Test your understanding

Practice the Enums concept by writing your own TypeScript example.

❓

MCQs

Check your knowledge

What is the main topic covered in Enums?

A.Enums
B.JavaScript Runtime
C.Database Management
D.Operating System
💼

Interview Questions

Prepare for TypeScript interviews

1

Interview Question

What is an enum?

2

Interview Question

Why are enums useful?

3

Interview Question

What is the default numeric value of the first enum member?