I need to do something like this:
Section 1, Chapter 1 title is “Dogs”
Section 1, Chapter 2 title is “Cats”
Section 2, Chapter 1 title is: “Goldfish”
I want to be able to write it something like this, with arrays:
section[0].chapter[0] = "Dogs";
section[0].chapter[1] = "Cats";
section[1].chapter[0] = "Goldfish";
This other post on stackoverflow has some answeres on how to create 2-dimensional arrays.
How can I create a two dimensional array in JavaScript?
Or you could use a “class”, though this may be needlessly complex…