Workshop › Frogger-style Crossing › Step 19 of 22
Every row a frog reaches for the first time is worth 10 points, and a home 50 more. Hopping back and forth on the same rows earns nothing.
```js
let score
let furthest // the highest row (smallest number) this frog has reached
furthest = START_ROW
score = 0
if (frog.y < furthest) {
furthest = frog.y
score += 10
}
score += 50
ctx.textAlign = 'left'
ctx.fillText('Score: ' + score, 10, 27)
```furthest is the smallest row number this frog has reached; a new frog starts at the bottom.furthest scores.let filled, write score and furthest; set furthest in newFrog and score in reset.hop, before the home check, give points for new rows; in reachHome, add 50.draw, write the score on the left.Skills: Game states