Ive been messing about with Javascript the last couple of days. Ive come across numerous issues, and worked out nearly all of them myself with Google. Now i keep getting a syntax error on a certain line, and i cant see anything wrong with it! In fact, i never had a problem with this line before, and i havnt changed it since!
I thought that maybe i had missed a parenthesis or other character somewhere in the script, however, i tried the section of code by itself, and it still has the syntax error Im a bit annoyed as its a simple bit of code too
Ive simplified it heaps and it still gives an error (SyntaxError: syntax error, line: 8 )
wth, its an 'else' statement?! Does anyone have any idea why this may be occurring and what i can do about it?
I thought that maybe i had missed a parenthesis or other character somewhere in the script, however, i tried the section of code by itself, and it still has the syntax error Im a bit annoyed as its a simple bit of code too
Ive simplified it heaps and it still gives an error (SyntaxError: syntax error, line: 8 )
Code:
for ( i = 1; i <= 20; i++);
{
RF = Math.round(Math.random());
if (RF <= 0.43);
{
a=1;
}
[B] else[/B]
{
a=2;
}
alert(t)
}
wth, its an 'else' statement?! Does anyone have any idea why this may be occurring and what i can do about it?