Skip to content

Commit b8a4500

Browse files
Update script.js
1 parent 4eb0211 commit b8a4500

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const wordDisplay = document.querySelector(".word-display");
2-
const guessesText = document.querySelector(".guesses-text b");
2+
var guessesText = document.querySelector(".guesses-text b");
33
const keyboardDiv = document.querySelector(".keyboard");
44
const hangmanImage = document.querySelector(".hangman-box img");
55
const gameModal = document.querySelector(".game-modal");
@@ -16,7 +16,8 @@ async function loadWords(file, sep) {
1616
for (var i = 0; i < words.length; i++) {
1717
wordList.push(words[i]);
1818
}
19-
document.querySelector(".guesses-text").innerHTML = 'Incorrect guesses: <b></b>';
19+
document.querySelector(".guesses-text").innerHTML = 'Incorrect guesses: <b></b>';
20+
guessesText = document.querySelector(".guesses-text b");
2021
getRandomWord();
2122
}
2223
loadWords("dictionary.txt", /\r?\n/);

0 commit comments

Comments
 (0)