Workshop › Frogger-style Crossing › Step 3 of 22
The frog and the traffic will move, so the picture is redrawn every frame.
```js
function loop() {
draw()
requestAnimationFrame(loop)
}
requestAnimationFrame(loop)
```requestAnimationFrame(loop) runs loop again before the next screen refresh, about 60 times a second.Replace draw() at the bottom with loop and requestAnimationFrame(loop).
Skills: The game loop