Using Enums In Javascript
This post will explain how to implement and use enumerations (or enum types) in Javascript. Enums are types that contain a limited number of fixed values, as opposed to types like Number or String which can have a wide range of values. This is useful for many situations: For example, when describing seasons in temperate climates, you’ll want to limit the options to certain possible values: Summer, Winter, Spring and Autumn....