diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-04-18 19:44:12 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-04-18 19:44:12 +0800 |
commit | 39a589d47c568dc53b7538811947b71bd66152d6 (patch) | |
tree | 75bddda0ed5720fd248b7b88cecc8723e0c3fb95 | |
parent | 11d66c51f8b5e2cd9613a87637fbc700235f1687 (diff) |
Show # of hints left
-rw-r--r-- | index.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -39,6 +39,7 @@ function newWord() { wordElem.innerHTML = currentWord.word; hintsLeft = 2; + hintElem.innerHTML = "Hint (2)"; // clean after the mess for (let elem of [inputElem, nextElem, hintElem, showAnswerElem]) { @@ -188,7 +189,9 @@ function hint() { linesElem.innerHTML = hint; hintElem.disabled = true; } + hintsLeft--; + hintElem.innerHTML = `Hint (${hintsLeft})`; } function showAnswer() { |