Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhrankan-Chakrabarti authored Jun 24, 2024
1 parent 4eb0211 commit b8a4500
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const wordDisplay = document.querySelector(".word-display");
const guessesText = document.querySelector(".guesses-text b");
var guessesText = document.querySelector(".guesses-text b");
const keyboardDiv = document.querySelector(".keyboard");
const hangmanImage = document.querySelector(".hangman-box img");
const gameModal = document.querySelector(".game-modal");
Expand All @@ -16,7 +16,8 @@ async function loadWords(file, sep) {
for (var i = 0; i < words.length; i++) {
wordList.push(words[i]);
}
document.querySelector(".guesses-text").innerHTML = 'Incorrect guesses: <b></b>';
document.querySelector(".guesses-text").innerHTML = 'Incorrect guesses: <b></b>';
guessesText = document.querySelector(".guesses-text b");
getRandomWord();
}
loadWords("dictionary.txt", /\r?\n/);
Expand Down

0 comments on commit b8a4500

Please sign in to comment.