Course · Lesson 20 of 20

Explain and change a complete form

Run the stay estimate, change a business rule and verify the behavior from inputs to summary.

Reading · Practice2 sectionsPrerequisites: Deliver the JavaScript edition offline
Course contents

Use a real, editable project

Return to the stay-estimate walkthrough with the tools you have learned. Read its 42-line Page, the seven-formula dependency diagram and the separate host setup. Download the project and use its README to run it locally. The archive is a worked example, not a replacement for your application’s host configuration.

Before editing, record a baseline: room selection, guest count, nights, subtotal, discount, total and deposit. Inspect Data alongside the visible values. The guide includes the demonstrated results and recordings for comparison.

Make one change and prove it

Change the discount threshold from seven nights to five in the Python file. Save, restart or use the documented development reload, then reload the browser. Enter the same inputs again: a five-night stay should now satisfy the changed condition.

Check the four/five-night boundary, a rejected and an empty draft, correction and a click-time summary. Compare the summary before and after another input edit. Finally describe how an authoritative server quote and explicit saving would extend the local estimate without pretending those integrations are already present.

Your turn

Try it yourself

  1. Run the editable stay-estimate project and reproduce its baseline before changing code.
  2. Apply the one-rule edit; compare four and five nights using the same room and guest count.
  3. Inspect all downstream calculations. Confirm that rejected drafts do not silently become accepted values and that correction recovers.
  4. Capture a summary, change an input without clicking, then capture again. Write down the expected and actual results.

Check your understanding

What should you be able to explain before calling your change complete?

Show the answer and expected result

Which declaration changed, which accepted Data values trigger it, how the result propagates through total and deposit, and when the summary captures it. Your boundary and recovery checks must match the rule. This completes the introductory course; use the galleries and manual for deeper API coverage and application-specific integrations.

Working examples and reference