In the preceding trace demo, a fixed fee was accidentally multiplied. Here the opposite happened: the awards scoreboard applies a multiplier to base points but forgets the bonus. The base is 12, the bonus is 3, and the multiplier is 2; the corrected score is 30.
For comparison, a separate practice score could be grouped like this:
const laps = 4;
const finishBonus = 2;
const doubled = (laps + finishBonus) * 2;
console.log(doubled); // 12
subtotal to add the two point values; the provided probe will log subtotal: 15.finalScore to multiply subtotal by multiplier; the provided probe will log final: 30.You can inspect types, trace intermediate results, and repair a faulty calculation. Check your understanding in the section quiz.
Inspect the intermediate values in the Console before changing the final line.