Code Zone Bug Lab / Episode 03
The Counter That Skips
One click should add one. Rob’s counter jumps from 0 to 2.

Your sprint ticket · In progress · DEV-146
The Counter That Skips.
Customer report: I clicked Add one once, but the counter increased by two.
Steps to reproduce
- Start at 0.
- Click Add one once, then twice more.
- Compare clicks with the count and Console messages.
Keep the existing counter and Reset behavior. Styling is outside this ticket.
Acceptance criteria
- One click changes 0 to 1.
- Three clicks change 0 to 3.
- Reset returns the count to 0.
- After Reset, the next click changes 0 to 1.
Learning demo only. No real accounts, purchases, or external requests.
Reproduce → inspect → hypothesize → verify
Take the ticket.
Reproduce the reported behavior before editing. Read the Console and inspect the JS tab. Explain one hypothesis, make a focused change, then use Check challenge below the code screen. Edits update the preview. Reveal hints one at a time if needed.
Checking account and saved lab work…
Sign in to sync across devicesChoose the copy to continue with. Keeping the device copy replaces the account copy only after a revision check.
Loading the JavaScript and HTML editor…
Pass the checks or make three attempts to unlock an explained example.
Ready to test? Choose “Check challenge” after investigating.
Code and prediction notes recover in this browser and sync when signed in. Instructor examples stay separate. Reset replaces code, not prediction notes.
Replace your edits with the original broken example?
Try first. Reveal one clue at a time.
Need a lead?
1. Follow one click.
How many “increment handler ran” messages appear for one click?
2. Inspect event registration.
Find every place addEventListener attaches the same click handler.
3. Keep one listener.
Register increment once. Removing both listeners would leave the button broken.
Your lab report
Show your reasoning.
“I expected… I observed… The console showed… My hypothesis was… I changed… I verified…”
Use Check challenge for automated behavior checks. Passing checks are useful evidence, not a complete code review.
Give others room to investigate: label solutions as spoilers.
Share your lab report on SKOOL (new tab) ↗