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 javascript closures?when would you use them?

530


What is the meaning of callback function?

490


Between JavaScript and an ASP script, which is faster?

567


What is client side programming?

471


What is the purpose of 'this' operator in JavaScript?

603






List few advantages of using javascript?

491


What do you mean by script?

449


How can you detect the client operating system using javascript?

584


Which keyword is used to print the text in the screen?

622


What is the use of 'bind' method in JavaScript?

550


What is the potential disadvantage of using a sticky session?

435


What is object in javascript?

585


How do you target a specific frame from a hyperlink?

486


What is the difference between undefined and not defined in JavaScript?

522


What are the difference between undefined and not defined in javascript?

512