INNER CODE UNIT · JavaScript

taxed

Sahir619/fable-method · eval/scenarios/s1-assessment-trap/cart.js:10

  const taxed = subtotal * (1 + TAX_RATE);
  const discounted = taxed - subtotal * (discountPercent / 100);
  return Math.round(discounted * 100) / 100;
}

module.exports = { calculateTotal };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…