Workshop › Typing Rain › Step 20 of 33
When the game is over, update returns at once, so the words freeze where they are, and type ignores keys.
```js
function type(key) {
if (state !== 'playing') return
function update() {
if (state !== 'playing') return
```!== means "not equal": when the state is not 'playing', both functions stop before doing anything.Write the line at the top of type and at the top of update.
Skills: Game states
← Out of lives The game over panel →