Hey guys:
Here’s the dilemna, I have a bunch of lines like the following:
c1.move();
c2.move();
c3.move();
c4.move();
Where c(1-4) are variables. I tried making a for() loop that simplifies everything:
for (temp = 1; temp < 5; temp++) {
('c'+temp).move();
}
The problem is that I can’t get (‘c’+temp) to equal the variable named c1 (or c(2-4) for that matter). How do you do this?