Workshop › Conway's Game of Life › Step 17 of 32
Every turn of the loop first updates the world, then draws it. One line, and the world comes alive.
```js
function loop() {
update()
draw()
requestAnimationFrame(loop)
}
```update() runs every frame before draw(): the world changes first, then the new picture is painted.In loop, write update() on the line above draw().
Skills: The game loop
← A generation every few frames Running or not →