Learning Javascript - Keep getting syntax errors in simple assignment!
I was wondering if anyone might take a quick look at this program I'm working on for a beginner class...it's brief. I keep getting syntax errors and cannot figure out why. All Firebug tells me is that I have a 'syntax error' for one of the 'else' statements.
Would really appreciate it, pretty please :)
<html>
<body>
<pre>
<script type="text/javascript">
// initalizing the values of three variables
var red = "X";
var blue = "O";
var green = "X";
// Per the statements below, check first for three X's
// If the criteria isn't met, move onto three O's
// If neither condition is met, display "Cat's game"
if ((red="X")&&(blue="X")&&(green="X")); {
window.document.writeln('X wins!');
} else {
if ((red="O")&&(blue="O")&&(green="O"));
window.document.writeln('O wins!');
} else {
window.document.writeln('Cat's game!')
}
</script>
</pre>
</body>
</html>