- 1
Guess
How do I restrict the number of guesses user has to guess a word in JavaScript
2 Answers
+ 3
I would advise the same logic as Adam did (though I reversed it to track remaining instead of the current guess number).
See the code: https://code.sololearn.com/Wh3jmbi3r1mb
+ 1
set up a counter. and every time they guess increment it by 1. check if counter < limit.