What is an enum

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different actions that are performed using javascript?

789


What does a typeof operator do?

752


Why is currying called currying?

635


What is the use of blur function in JavaScript?

728


How are event handlers utilized in javascript?

798


What is the main difference between Map collections and other collections such as Set.

2824


Why do we need currying?

630


What is null in javascript?

699


What is a class in javascript?

677


Are Attributes and Property the same?

758


How to create multiline strings in javascript?

661


What is array in javascript?

676


Describe the properties of an anonymous function in JavaScript?

908


What does undefined value mean in javascript?

770


How to reload the current page?

741