for (var i = 0;i<9;i++) {
trace(“Starting Loop”);
trace(i);
a += i;
trace(a);
trace(“ending loop”);
}
Ok I understand how i is being assigned but when I trace(a) after the 2nd loop it traces the number 3 and from there a is changed HOW exactly is it doing that? I dont understand!
This is some code i was looking up in a book and i’m frustrated because I dont understand how the variable a is changing! :q: :q: