The rubber duck that refuses to give you the answer.
Quack asks questions until you find the problem yourself. It never writes the fix, so what you learn sticks.
scores.jsprints NaN, expected 259
1const scores = [88, 92, 79];2let total = 0;3for (let i = 0; i <= scores.length; i++) {4total += scores[i];5}6console.log(total); // NaN
On the last trip through the loop, what value does i have?
How a session goes
Paste your code
Python or JavaScript. Say what it should do, then run it here in the browser.
Explain it to the duck
Type or talk. Quack replies with one question at a time.
Find the fix yourself
Stuck? Take a hint. Four levels, from a nudge to the exact line, but never the fix.
What else it does
- Answers stay hidden
- Every reply is checked before you see it. If it gives the fix away, Quack rewrites it as a question.
- Runs in your browser
- Python and JavaScript run in a sandbox, and infinite loops stop after five seconds.
- Bug journal
- Each solved bug is saved with what you learned, so repeat mistakes start to stand out.
- Voice
- Talk to the duck and it talks back. Works in Chrome and Edge.