For Loop Not incrementing
Why is my for loop not incrementing?
I declare the variable i to equal 2, and for testing I have an aleart box popup with the value at i, which is equal to 2, then after the for loop I have another alert box which is equal to i, which should be 4 but is 2 instead. This means my for loop is not incrementing. What did I do wrong?
var i = 2;
alert("Test: " + i);
for (i = 2; i > 4; i++);
{
TFor="Tab" + i;
BFor="Body" + i;
//i = i + 1;
}
alert("Test: " + i);
thanks,
Donrafeal7
|