I have a constructor that makes squares.
I would like my code to automatically create squares from this constructor using loops and name them square1, square2, square3 ect.
eg.
for (n=1; n < x; n++){
var square(n) = new Square();
}
Is this possible?
If so how and how do I refer to them in a loop - like square(n)?
I'm new to programming, oop and javascript so sorry if this is really ovb. thanks in advance