Hello, is there a way to correctly add past values of arguments with new ones?
Code:
const TAX = 73; function getTax (buy) { let discount = buy / 100 * TAX; return discount; } console.log(getTax(9000)); console.log(getTax(18000)); console.log(getTax(27000)); console.log(getTax(36000)); console.log(`Налог с продаж (${TAX} %), к оплате: ${getTax()} Q`); In console.log( Sales Tax ($ {TAX}%), to be paid: $ {getTax ()} Q ); I need to get the sum of all the earlier arguments, that is, simply add up the values of the earlier calculated argument values.