This is a course project that uses Javascript/Html/Css with DOM manipulation to guess the right letters in a random word.
An array of strings has been created for the phrases
5 phrases are in the array
Phrases in array include only letters and spaces
A random, unknown phrase is chosen when the page loads
Each letter and space is appended to the phrase display
Only letters in the phrase have the class “letter”
Clicking a letter present in the phrase adds the “show” class to those letters in the display
Clicking a letter not present in the phrase increases the count of the missed variable by 1 and changes a liveHeart.png image to a lostHeart.png image.
No letter can be clicked twice
Clicking space between letters does nothing
If a player makes 5 wrong guesses, the “lose” overlay is shown
If all the letters in the phrase are shown, the “win” overlay is shown
A button has been added to the “lose” and “win” overlays to reset the game