This is javascript.
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 the remaining letters, but fill in the letters that the user guessed correctly. Store the user's guess in a from field. For example, if the word you want to guess is "dog" and the user has successfully guessed the letters "d" and "g", then store d*g 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 guess character from the form each time it is sumitted, and add functionality that displays an alert dialog box if the user fails to enter a character.