So I have been working really hard trying to complete my hangman game, but I cannot find whats wrong with my code. As you can see, when you hit "start", one star pops up. I am trying to get the amount of letters in the hidden word pop up. Also, when I try and guess the letter of the word, nothing seems to happen. I am not looking for the answer, rather I am just looking for someone to point me in the correct direction to finish this. Here is my code. Any help is greatly appreciated.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<body>
<script>
var start = true;
var words = new Array("ANIMAL", "BREWERS", "FIERCE" , "XIOLPHONE" ,"BEAR", "BASEBALL", "PACKERS", "START", "ZEBRA");
var guess = "";
var show = ""; //display
var gone = ""; //used letters
var guesses= new Array ();
//function createMask = make
function make(m)
{
mask = "";
word_length = m.length;
for (i = 0; i < word_length; i ++)
{
mask += "*";
}
return mask;
}
Bookmarks