3. Set up the Folder Structure with Library Files

The MVC folder structure of our enumeration app extends the structure of the validation app by adding the file Enumeration.js in the lib folder. Thus, we get the following folder structure containing six initial files:

publicLibrary
  css
    main.css
  lib
    browserShims.js
    errorTypes.js
    util.js
    Enumeration.js
  src
    ctrl
    model
    view
  index.html

In the Enumeration.js file, discussed in the next section, we define a meta-class Enumeration for creating enumerations as instances of this meta-class with the help of statements like GenderEL = new Enumeration(["male", "female", "undetermined"]).