Impossible Burger King Lab

Instructions & Help

🎮 Open the Lab (new tab) →
🎯

What You're Building

List Function with a Parameter Loop Conditional Statement

A burger builder that tracks every ingredient clicked in a LIST, then recalculates cost from that list every time. There's also a sneaky extra piece of state - a variable called time - that tracks whether you're "inside" a burger (between the bottom and top bun) or not, completely separate from the list. 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 these by hand — pay close attention to the ORDER lines run in, and to the difference between the burger list and the time variable. 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: