The DOM and an interactive transaction form
Let a person use the ledger
The DOM is the browser's object model for the page. JavaScript can listen for a form submission, read its fields, update application state, and render the new result.
This is the turning point: Smart Ledger stops being a script and becomes an application.
Instructions
Select the form and list with querySelector.
Hint: document.querySelector('#transaction-form')
Where does this go?
// Listen for submit, prevent the refresh, push an object, and render.Write it on line 6 — under that comment, after the code you already added.
Create renderTransactions and render array items with map.
Listen for submit and call preventDefault.
Push a transaction object and render again.
Your Code
Describe what you want to build for this step and I'll write the code — then click Apply to drop it into your editor. This step: Select the form and list with querySelector.
Live Preview
Build your next project with Builder
Ready to build agents and automate real work? Builder unlocks the full Agent Builder and Claude × Excel courses, Studio Build Credits and Build Blueprint. Your free Fundamentals lessons remain available.
- 500 Studio Build Credits a month
- Build Blueprint: a clear spec for any idea, ready for your AI agent
- Every lesson in the other full courses
$19 a month
Full refund within 14 days on new subscriptions. Cancel anytime.
The payment page is run by Lemon Squeezy, our payment provider. If it opens in a language you don't read, switch it in the language menu at the top of that page.
See pricingBuilder does not include third-party AI subscriptions. Lessons that need one say so up front.