In class, we learned how to refactor our cookie stand objects using a constructor and instances. Let's replace your object literals with a single constructor that when called with 'new', creates new instances. See pages 106-109 in your textbook for an example... and especially focus on 108 and 109.
We will also be replacing the lists of data for each store, and implementing a table of data instead!
- As a developer, I want to implement a constructor function, so that I can reuse code and eliminate much of the duplication in my JavaScript
- As a developer, I want to present the store data in a table format on the webpage, so each store's data is easier to represent and understand
- As a developer, I want to continue to evolve my styleguide (keep working on adding more details or finishing up what's not complete)
- Working on a non-master branch for the day, with regular commit history
- Good use of a constructor function; style and syntax are correctly implemented
- Duplicate code has been removed and DRY principles are evident
- Table has been implemented and lists are no longer used to represent store data
- Styleguide is improving and becoming more specific (separate file from main page)
- As a user, I want to be able to add a new store to my webpage, so that I have the ability to work independently of my developer
- This is a large stretch goal. There will be Forms and Events involved, which you are welcome to read ahead on and try to implement.