Code Zone Bug Lab / Episode 05
The Last Task Goes Missing
Rob has three tasks. The page only shows two. Find where the last one went.

Your sprint ticket · In progress · DEV-148
The Last Task Goes Missing.
Customer report: My list has Plan, Build, and Test. The page only displays Plan and Build.
Steps to reproduce
- Load the three starter tasks.
- Compare the source array with the rendered list.
- Use Show one task and Show no tasks to investigate smaller lists.
Fix the rendering boundary. Adding, editing, or storing tasks is outside this ticket.
Acceptance criteria
- All three starter tasks appear in the original order.
- A single-item list shows that item.
- An empty list shows no task rows.
- Rendering a different list replaces the previous rows without duplicates.
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. Count the iterations.
Which indices does the loop visit? Compare the last visited index with the array length.
2. Check the stopping condition.
The last valid index is length - 1. A strict less-than comparison stops before its right-hand boundary.
3. Test smaller lists.
Use i < tasks.length. Verify both a one-item array and an empty array.
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) ↗