What is enum with example?



What is enum with example?..

Answer / Santosh Kumar Paswan

An Enum (Enumeration) in JavaScript ES6 is a collection of named constants. It can help to improve readability and reduce bugs by restricting variables to a specific set of values. Example: `enum Days {Sun, Mon, Tue, Wed, Thu, Fri, Sat}`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

How about 3+5+"8"?

1 Answers  


hi iM rahul.my questions is my project is a web based & developed using java,jsp. when i record it using qtp what script i will get like either browser("jdfjkf").page("nkf").... or javawindow("f d ").javaedit("Dasf").... plz clarify my doubt asap and i also need some vbscipt of java coding?

1 Answers  


Is javascript becoming obsolete?

1 Answers  


Is client side front end?

1 Answers  


Is javascript a security risk?

1 Answers  


What is require in javascript?

1 Answers  


How do we get javascript onto a web page?

1 Answers  


How Can I get facebook fans/likes?

1 Answers  


How to write a script for "select" lists using javascript

1 Answers  


Write a way by which you can do something on the close of the window ?

1 Answers  


How to handle event handlers?

1 Answers  


Is an interface is a class?

1 Answers  


Categories