Running Calculator Lab

Instructions & Help

🏃 Open the Lab (new tab) →
🎯

What You're Building

Function with Parameters Loop Conditional Statement

A calculator that reads one flat list of numbers representing several runners' distance/time pairs back-to-back, then works out each runner's pace. The standout idea here is the loop stepping by 2 instead of 1, since each runner takes up TWO spots in the list, not one. Fill in the missing code in code.js, one TODO at a time.

⏱️

Need Help Coding?

Try each TODO yourself first. If you get stuck, use the hint button for that spot — hints start vague and get more specific. The last hint is the literal answer.

⏱ Hints are on a shared 30-second timer. Asking for a hint anywhere locks every hint button on the page — there's no dodging the wait by jumping to a different blank.

🔮

Predict & Check

Trace the index math by hand - write out what d[i] and d[i+1] actually refer to before picking an answer. One attempt per question.

🏆

Your Certificate

Your certificate below is based on your Predict & Check results. It updates automatically as you answer questions.

🎨

Make It Yours

Once your code works and you've finished Predict & Check, try any of these: