The 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 with four files in the lib
folder:
publicLibrary
css
lib
browserShims.js
errorTypes.js
util.js
Enumeration.js
src
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"])
.