Workshop › Asteroids › Step 36 of 41
The game is either 'playing' or 'over'. We keep that in state, and update does nothing unless the game is being
played.
```js
let state // 'playing' or 'over'
state = 'playing'
function update() {
if (state !== 'playing') return
```newGame sets state to 'playing'.!== means "is not equal to", and return leaves update at once.let wave write let state.newGame, under bullets = [], write state = 'playing'.update write the return line and an empty line.Skills: Game states
← One function to start Game over →