function inputNewStore (event) {
event.preventDefault(); 
console.log('information for a new store');

var name = event.target.storeLocation.value;
var min = event.target.minCustomers.value;
var max = event.target.maxCustomers.value;
var avg = event.target.avgCookies.value;

var newStore = new cookieStore(name,min,max,avg);

console.log(loc,min,max,avg);
console.log(newStore);
newStore.render();

cookieStores.push(newStore);
renderTable();
 
}
//this is the function to add a new store and stops the page from refreshing when form is submitted

this is the function to add a new store and stops the page from refreshing when form is submitted
this is the function to add a new store and stops the page from refreshing when form is submitted
function inputNewStore (event) {
event.preventDefault(); 
console.log('information for a new store');
var name = event.target.storeLocation.value;
var min = event.target.minCustomers.value;
var max = event.target.maxCustomers.value;
var avg = event.target.avgCookies.value;
var newStore = new cookieStore(name,min,max,avg);
console.log(loc,min,max,avg);
console.log(newStore);
newStore.render();
cookieStores.push(newStore);
renderTable();
}
function inputNewStore ( event ) { event . preventDefault ( ) ; console . log ( 'information for a new store' ) ; var name = event . target . storeLocation . value ; var min = event . target . minCustomers . value ; var max = event . target . maxCustomers . value ; var avg = event . target . avgCookies . value ; var newStore = new cookieStore ( name , min , max , avg ) ; console . log ( loc , min , max , avg ) ; console . log ( newStore ) ; newStore . render ( ) ; cookieStores . push ( newStore ) ; renderTable ( ) ; }
this is the function to add a new store and stops the page from refreshing when form is submitted
this is the function to add a new store and stops the page from refreshing when form is submitted