InterviewHubPRO
Section Overview
Q284

Question 284 of 521

Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

55%
JavaScript Internals (521 Qs)•Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

What is an enum

An enum is a type restricting variables to one value from a predefined set of constants. JavaScript has no enums but typescript provides built-in enum support.

javascript
  enum Color {
   RED, GREEN, BLUE
  }