Time: 0:00
This is a type errors bug
Totals that concatenate, sorts that put 10 before 9, comparisons that refuse to run.
What went wrong: const means the value can never change. count++ tries to change it.
The fix: let count = 0;
Remember: use let for values that change, like counters and totals.
The pattern behind it: type errors.
Paste this into any web page or blog post. Visitors fix the bug right there, in their browser.
<iframe src="https://trybughunt.com/embed/09041b66-1562-4aaa-9792-9eef7a3fb3e3" title="Debugging challenge: Counting positives crashes on the first one" width="100%" height="580" loading="lazy" style="border:1px solid #d4d4d8;border-radius:12px;max-width:760px"></iframe>
<p style="font-size:14px">Debugging challenge from <a href="https://trybughunt.com/challenges/09041b66-1562-4aaa-9792-9eef7a3fb3e3">BugHunt</a></p>