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 32db16b commit 70ea67c
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
Expand Up @@ -8,8 +8,9 @@ const playAgainBtn = gameModal.querySelector("button");
// Initializing game variables
let currentWord, correctLetters, wrongGuessCount;
const maxGuesses = 11;
const response = await fetch('dictionary.txt');
const wordList = await response.text().split('\n');
const response = await fetch("dictionary.txt");
const text = await response.text();
const wordList = text.split('\n');

const resetGame = () => {
// Ressetting game variables and UI elements
Expand Down

0 comments on commit 70ea67c

Please sign in to comment.