When updating variables, ensure operations are in the correct order and the variable types are compatible. For instance, 'total += price * discount;' should have a proper calculation order, where 'discount' is a fraction (e.g., 0.1), not a percentage like 10.
Additional Notes
How can you avoid common pitfalls when updating a variable?