Workshop › Hangman › Step 15 of 36
The figure has six parts, so six misses is the most. MAX_WRONG names that number, and guess stops listening once
wrong reaches it.
```js
const MAX_WRONG = 6
if (guessed.has(letter) || wrong === MAX_WRONG) return
```MAX_WRONG is the number of misses allowed.|| means "or": guess returns if the letter was tried or the misses are used up.LETTERS line write const MAX_WRONG = 6.guess, add || wrong === MAX_WRONG to the first if. Press Run.Skills: Game states
← The same letter twice is free Show the misses →