Skip to content

cdl124/donut_shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Top Pot Doughnuts Table of Hourly and Daily Simulated Demand

By Cortney Lane

This project uses HTML and JavaScript to generate a table that displays simulated hourly demand at five Top Pot locations. The number of doughnuts sold per hour is then added up into a daily total at the end of the location's table row.

In this project, I learned how to create and append table rows and table data using JavaScript by manipulating the DOM. I also learned how to create a constructor function, and use prototype functions to more efficiently save object data and generate location demand data. The number of customers per hour is a randomized number, falling somewhere between the location-specific minimum and maximum customers per hour, and totals in the table are based off of those generated numbers.

How to grab the value of the option selected within the drop-down select menu: http://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript

Where I was reminded that the filter() method can help me get an existing object with a specific property value: http://stackoverflow.com/questions/13964155/get-javascript-object-from-array-of-objects-by-value-or-property

How to repeat the same image multiple times (for an easter egg in script.js): http://www.kirupa.com/html5/loops_in_javascript.htm

Where I learned the BIG difference between "push"ing to an array, and assigning a value to each array index (which cleared up a very, very persistent bug...): Stuart (my fiance)

Inspiration for donut shop webpage layout colors: https://dribbble.com/shots/2379206--Pan-evo-dairy

The color theme I adopted: https://color.adobe.com/Kayak-color-theme-472760/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published