js/app.js
// event handler for form submission: creates a new store and resets the form
event handler for form submission: creates a new store and resets the form
event handler for form submission : creates a new store and resets the form
function handleFormSubmit(e) {
  e.preventDefault();
  if (e.target.minCustomers.value > e.target.maxCustomers.value) {
    alert('Oops! The max customers must be greater than or equal to the min customers.');
  } else {
    new Store(
      e.target.storeName.value,
      '',
      parseInt(e.target.minCustomers.value),
      parseInt(e.target.maxCustomers.value),
      parseFloat(e.target.avgCookies.value)
    );
    e.target.reset();
  }
}
function handleFormSubmit ( e ) { e . preventDefault ( ) ; if ( e . target . minCustomers . value > e . target . maxCustomers . value ) { alert ( 'Oops! The max customers must be greater than or equal to the min customers.' ) ; } else { new Store ( e . target . storeName . value , '' , parseInt ( e . target . minCustomers . value ) , parseInt ( e . target . maxCustomers . value ) , parseFloat ( e . target . avgCookies . value ) ) ; e . target . reset ( ) ; } }
event handler for form submission: creates a new store and resets the form
event handler for form submission : creates a new store and resets the form