function footerRow (){
    //row
    let footerRow =document.createElement('tr');
   table.appendChild(footerRow);
   
    let tdElement = document.createElement ('td')
   footerRow.appendChild(tdElement);
tdElement.textContent ='Totals';
let totalEachDay =0;
   
    //footer data :
    for(let i=0 ; i<hours.length ; i++){
      let totalEachHour=0;
    
        for(let j=0; j<theStoreDetailsArray.length; j++){
            totalEachHour+=theStoreDetailsArray[j].salesPerHour[i] 
            
        }

       let tdElement2 = document.createElement('td');
       footerRow.appendChild(tdElement2);
        tdElement2.textContent=totalEachHour
     totalEachDay+=totalEachHour
        
        }

       let tdElement3 = document.createElement('td');
        footerRow.appendChild(tdElement3);
         tdElement3.textContent=totalEachDay

    
}
//create  function for footer row of table
create  function for footer row of table
create function for footer row of table
function footerRow (){
    let footerRow =document.createElement('tr');
   table.appendChild(footerRow);
    let tdElement = document.createElement ('td')
   footerRow.appendChild(tdElement);
tdElement.textContent ='Totals';
let totalEachDay =0;
    for(let i=0 ; i<hours.length ; i++){
      let totalEachHour=0;
        for(let j=0; j<theStoreDetailsArray.length; j++){
            totalEachHour+=theStoreDetailsArray[j].salesPerHour[i] 
        }
       let tdElement2 = document.createElement('td');
       footerRow.appendChild(tdElement2);
        tdElement2.textContent=totalEachHour
     totalEachDay+=totalEachHour
        }
       let tdElement3 = document.createElement('td');
        footerRow.appendChild(tdElement3);
         tdElement3.textContent=totalEachDay
}
function footerRow ( ) { let footerRow = document . createElement ( 'tr' ) ; table . appendChild ( footerRow ) ; let tdElement = document . createElement ( 'td' ) footerRow . appendChild ( tdElement ) ; tdElement . textContent = 'Totals' ; let totalEachDay = 0 ; for ( let i = 0 ; i < hours . length ; i ++ ) { let totalEachHour = 0 ; for ( let j = 0 ; j < theStoreDetailsArray . length ; j ++ ) { totalEachHour += theStoreDetailsArray [ j ] . salesPerHour [ i ] } let tdElement2 = document . createElement ( 'td' ) ; footerRow . appendChild ( tdElement2 ) ; tdElement2 . textContent = totalEachHour totalEachDay += totalEachHour } let tdElement3 = document . createElement ( 'td' ) ; footerRow . appendChild ( tdElement3 ) ; tdElement3 . textContent = totalEachDay }
create  function for footer row of table
create function for footer row of table
//row //footer data :