Full playable demo

Try the finished feature

Add products and apply SAVE10 to see the total update.

Playable result only — the source code stays hidden.

Mission 00 4 min

Mission 0: See What You’re Building

Add two products, try SAVE10, and watch the numbers change before you build the maths yourself.

Build roadmap

What you’ll build, mission by mission

  1. 1
    Calculate the Cart Total

    Add product prices with a running total.

  2. 2
    Make SAVE10 Work

    Use a simple condition to store a 10% discount.

  3. 3
    Show the Discounted Total

    Calculate the saving and final amount.

Mission demoCalculate the Cart Total

Finished result only — the answer code stays hidden.