Code Room
Code reviewMediumcr-g110
Subject Money roundingLevel Mid–Senior~25 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this JavaScript invoice line-item total.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewjavascript
function lineTotal(unitPriceUsd, qty, taxRate) {  const subtotal = unitPriceUsd * qty;  const tax = subtotal * taxRate;  const total = subtotal + tax;  return Math.round(total * 100) / 100;} // lineTotal(0.10, 3, 0.0);  -> expected 0.30
Run or narrate your approach, then ask the coach.