Command Palette

Search for a command to run...

Hectal
Phase 15: Interviews and Capstone
AI Frontend · Exercise 4 of 6 PreviousNext
Intermediate

Fix the Missing Words

A reviewer reported that Mitra's streamed answer shows only its last word. The button #ask starts the answer and the answer should end up in #answer as the whole sentence Returns are accepted within seven days.

Find the bug in the reading loop and fix it. The loop must not read the old value of answer.

What Check tests

  1. At the start #answer is empty
  2. After the answer finishes, #answer shows the whole sentence
  3. Asking again starts from an empty answer and ends with the same sentence

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.