Workshop › Typing Rain › Step 7 of 33
A game loop runs again and again: update, draw, and ask the browser to run it again before the next screen refresh
(requestAnimationFrame, about 60 times a second). The words start to fall.
```js
function loop() {
update()
draw()
requestAnimationFrame(loop)
}
reset()
requestAnimationFrame(loop)
```loop runs one turn: move the words, then draw them.requestAnimationFrame(loop) inside it books the next turn, so it keeps going.draw() call.At the bottom, write loop above reset() and replace draw() with requestAnimationFrame(loop).
Skills: The game loop
← Make them fall A new word from the list →