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

Can I write javascript in notepad?

515


What is jscript used for?

479


all possible test cases for normal number field,name field date field,check box,

946


How to access the value of a textbox using javascript?

487


What is spread syntax?

483






What are the types of variables in javascript?

476


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

632


accessdenied javanet disconnet

1580


Create an array in javascript with a list of 4 colors, assign that array to the variable, ‘colors’.

444


What Is The Disadvantages Using InnerHTML In JavaScript?

532


What is the difference between typeof and instanceof operators in Javascript?

577


How do I open javascript in chrome?

464


How to create array in JavaScript?

550


What is javascript in simple terms?

481


What's the difference methods get and post in html forms?

480