Workshop › Conway's Game of Life › Step 10 of 32
draw runs only once, so a new generation would never reach the screen. A loop redraws the picture about 60 times a
second with requestAnimationFrame.
```js
function loop() {
draw()
requestAnimationFrame(loop)
}
reset()
requestAnimationFrame(loop)
```loop draws once and books the next run with requestAnimationFrame(loop), so it never stops.draw() call.At the bottom, write loop above reset() and replace draw() with requestAnimationFrame(loop).
Skills: The game loop
← Four rules Next generation with N →