var myList = document.getElementById("my_list")
var hoursOpen = ["10am", "11am","12am","1pm","2pm","3pm","4pm", "5pm"];

var pikePlace = {
  name: "Pike Place",
  min: 17,
  max: 88,
  avgSales: 5.2,
  hourlySales: [],
  totalSales: 0,
  randomCustomer: function () {
    return Math.floor(Math.random() * (this.max - this.min) + this.min);
  },
  //use for loop to generate a random number and multiply it by the average and stick in hourly sales. add to total sales
  generateHourly: function () {
    for (var i = 0; i < hoursOpen.length; i++) {
      this.hourlySales.push(Math.floor(this.avgSales * this.randomCustomer(this.min, this.max)))
      // this.totalSales[i]+= this.hourlySales[i];
      this.totalSales = this.totalSales + this.hourlySales[i];
    }
  }
}
// var sectionEl = document.getElementById('myList');
// var ulEl = document.createElement('ul');
//
// for(month in months) {
//   var liEl = document.createElement('li');
//   liEl.textContent = months[month];
//   var nestedUlEl = document.createElement('ul');
//
//   for(week in weeks) {
//     var nestedLiEl = document.createElement('li');
//     nestedLiEl.textContent = weeks[week];
//     nestedUlEl.appendChild(nestedLiEl);
//   }
//
//   liEl.appendChild(nestedUlEl);
//   ulEl.appendChild(liEl);
// }
//
// sectionEl.appendChild(ulEl);

@@ -1,12 +1,15 @@
+// 
 var myList =
@@ -44,16 +44,16 @@
 _list%22)%0A
-
 var hour
@@ -115,16 +115,70 @@
  %225pm%22%5D;
+%0Avar demand = %5B%5D; //generate hourly should go in here?
 %0A%0Avar pi
@@ -695,16 +695,17 @@
 s.max)))
+;
 %0A      /
@@ -823,19 +823,16 @@
 %7D%0A  %7D%0A%7D%0A
-// 
 var sect
@@ -868,21 +868,18 @@
 Id('
-myList
+store1
 ');%0A
-// 
 var 
@@ -919,40 +919,34 @@
 ');%0A
-//%0A// for(month in months
+%0Afor(hour in hoursOpen
 ) %7B%0A
-// 
   va
@@ -984,19 +984,16 @@
 ('li');%0A
-// 
   liEl.t
@@ -1009,26 +1009,25 @@
 t = 
-months%5Bmonth%5D;%0A// 
+hoursOpen%5Bhour%5D;%0A
   va
@@ -1075,40 +1075,34 @@
 ');%0A
-//%0A//   for(week in weeks
+%0A  for(value in demand
 ) %7B%0A
-// 
     
@@ -1148,19 +1148,16 @@
 ('li');%0A
-// 
     nest
@@ -1181,24 +1181,23 @@
 t = 
-weeks%5Bweek%5D;%0A// 
+demand%5Bvalue%5D;%0A
     
@@ -1236,21 +1236,13 @@
 l);%0A
-// 
   %7D%0A
-//%0A// 
+%0A
   li
@@ -1269,19 +1269,16 @@
 dUlEl);%0A
-// 
   ulEl.a
@@ -1299,19 +1299,11 @@
 l);%0A
-// %7D%0A//%0A// 
+%7D%0A%0A
 sect

generate hourly list in html