What is an enum
Answer / hrpatelsoft@gmail.com
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.
enum Color {
RED, GREEN, BLUE
}
| Is This Answer Correct ? | 0 Yes | 0 No |
What is output of undefined * 2 in javascript?
How does javascript work?
What is new function in javascript?
Why does the browser display the slow script warning?
What is the use of a weakmap object in javascript?
Is javascript event driven?
What is the difference between "var" and "let" keywords?
What is javascript in simple terms?
how to get no of items from from weblist?
How do you extend classes Code snippet: const circle = { radius: 20, diameter() { return this.radius * 2; }, perimeter: () => 2 * Math.PI * this.radius };
How to write html code dynamically using JavaScript?
How to create an object using javascript?