Text Tools
Diff Checker
OriginalChanged
+1-16 unchanged
| 1 | function calculateTotal(items) { |
| 2 | let total = 0; |
| 3 | for (const item of items) { |
| 4 | total += item.price * item.quantity; |
| 5 | } |
| 6 | return total; |
| 6 | return total.toFixed(2); |
| 7 | } |
| 1 | function calculateTotal(items) { |
| 2 | let total = 0; |
| 3 | for (const item of items) { |
| 4 | total += item.price * item.quantity; |
| 5 | } |
| 6 | return total; |
| 6 | return total.toFixed(2); |
| 7 | } |