Create a script that presents a word-guessing game allow


Create a script that presents a word-guessing game. Allow users to guess the word one letter at a time by entering a character in a form. Start by assigning a secret word to a variable. After each guess, print the word using asterisks for each remaining letter, but fill in the letters that the user guessed correctly. Store the user's guess in a form field. For example, if the word you want users to guess is "suspicious" and the user has successfully guessed the letters "s" and "i," then store s*s*i*i**s in the form field. You need to use multiple arrays along with the split() and join() methods to create the game's functionality.

Clear the guessed character from the form each time it is submitted, and add functionality that displays an alert dialog box if the user fails to enter a character. Save the document as GuessingGame.html.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a script that presents a word-guessing game allow
Reference No:- TGS01723312

Now Priced at $40 (50% Discount)

Recommended (90%)

Rated (4.3/5)