Workshop › Typing Rain › Step 23 of 33
Every 10 words you go up a level. Letters are worth level points each, so surviving longer pays.
```js
let level
let cleared // words typed this game
level = 1
cleared = 0
score += target.text.length * level
cleared += 1
if (cleared % 10 === 0) level += 1
ctx.fillText('Score ' + score + ' Level ' + level, 10, 22)
```cleared counts finished words. cleared % 10 is the remainder of dividing by 10; it is 0 at 10, 20, 30 words, and
then the level goes up.let score write let level and let cleared; in reset, under score = 0, write level = 1 and
cleared = 0.type, change the score line and add the two lines under it.draw, add the level to the score text.Skills: Game states
← Play again Faster and faster →