JavaScript tic tak toe program not working
<pre><code>    &lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="content-type" content="text/html; charset=windows-1252"
    &lt;title&gt; "tic tac toe"&lt;/title&gt;
    &lt;script language="JavaScript"&gt;
        var Next = "X";
        var count = "O";
        var square= new Array()
        for (var i=0; i&lt;9; i++) square[i] = true;
        function makeMove(squareindex)                  
        {
            if (square [squareindex] == true;
            }
            (square [squareindex] == true;
                count++;
                document.getElementById(squareindex).value = ""+next+"";
                if Next == "X";
                {
                    Next == "O";
                }
                else
                {
                    Next == "X";
                }
                if (count == 9) document.getElementById("toeDisplay").innerHTML="Game Over!";
                else document.getElementById("toeDisplay").innerHTML= It is/""+next+""/'s turn";
            }
            else
            {
                document.getElementById("toeDisplay").innerHTML = "Fail";
            }
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &amp;nbsp;&amp;nbsp;&amp;nbsp;tic tac toe
    &lt;table border=1 id="tictactable"&gt;&lt;form name="tic tac toe"&gt;&lt;/form&gt;   
        &lt;tr&gt;
            &lt;td id="toeDisplay" colspan=4 align=center bgcolor=white&gt; It is "X"'s turn&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;                                                         
            &lt;td align=center&gt;&lt;INPUT id="0" TYPE="button" value="  "onClick="makeMove(0)"&gt;&lt;/td&gt;          
            &lt;td align=center&gt;&lt;INPUT id="1" TYPE="button" value="  "onClick="makeMove(1)"&gt;&lt;/td&gt;  
            &lt;td align=center&gt;&lt;INPUT id="2" TYPE="button" value="  "onClick="makeMove(2)"&gt;&lt;/td&gt;
        &lt;/tr&gt;                                                  
        &lt;tr&gt;                                                
            &lt;td align=center&gt;&lt;INPUT id="3" TYPE="button" value="  "onClick="makeMove(3)"&gt;&lt;/td&gt;      
            &lt;td align=center&gt;&lt;INPUT id="4" TYPE="button" value="  "onClick="makeMove(4)"&gt;&lt;/td&gt; 
            &lt;td align=center&gt;&lt;INPUT id="5" TYPE="button" value="  "onClick="makeMove(5)"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td align=center&gt;&lt;INPUT id="6" TYPE="button" value="  "onClick="makeMove(6)"&gt;&lt;/td&gt;
            &lt;td align=center&gt;&lt;INPUT id="7" TYPE="button" value="  "onClick="makeMove(7)"&gt;&lt;/td&gt;
            &lt;td align=center&gt;&lt;INPUT id="8" TYPE="button" value="  "onClick="makeMove(8)"&gt;&lt;/td&gt;
        &lt;/tr&gt; 
&lt;/table&gt;        

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Hi there! I got this code for a JavaScript tic-tac-toe program and cant get it to work. What am i doing wrong? I made spell checks and didn't find any thing and still it wont work. Its supposed to function like a normal game of tic-tac-toe. Your "X" and the computer would be "O". It would make the computer make a move when you hit a button, and i cant seem to get that to work.</p>
