[Solved] How to sum of table amount in javascript? [closed]
Like this: var tr = “”; var totalAmount = “”; var total = 0; //this your total var footerTr = “”; for(var i=1; i<=31; i++){ tr += `<tr> <td>${i}</td> <td>${i*2}</td> </tr>`; totalAmount += `${i*2}+`; total += i*2; //this your total } totalAmount = totalAmount.substring(0, totalAmount.length – 1); // remove last plus totalAmount += ‘=’+total; footerTr … Read more