What basicinstinct: is trying to say is:
if you want to execute a number of statements, you need to surround them with curly braces. For example:
if (somethingIsTrue)
{
statement 1;
statement 2;
}
else statement 3;
in the above example, the first 2 statements (whatever they are) are executed if 'something is true;. If it is false, statement 3 is executed.
btw: if this is homework, you should tell people so that they can explain what they did rather than simply supply an answer
Main Topics
Browse All Topics





by: basicinstinctPosted on 2007-09-08 at 00:55:33ID: 19852713
do you mean to do this?
if (i % 100 == 0)
{
line1 = "Generated " + i + " numbers...<br>\n";
line2 = "Generated " + i + " numbers...<br>\n";
document.write(line1, line2);
}