Workshop › Wordle-style Word Guess › Step 6 of 26
The picture must follow every key, so we redraw it all the time: a loop that draws and asks the browser to run it again before the next screen refresh.
```js
function loop() {
draw()
requestAnimationFrame(loop)
}
requestAnimationFrame(loop)
```loop draws once, then books itself for the next frame.draw() call.Replace the draw() call at the bottom with the loop function and requestAnimationFrame(loop).
Skills: The game loop
← Six rows The typed letters →