I would like to know how I can access the var randomnumber inside that cubesmixed-Array
This is the code:
var cubesmixed = [paper.rect(randomnumber, randomnumber, 0, 0),
paper.rect(randomnumber, randomnumber, 0, 0),
... going on till over 100];
var randomnumber;
for(var i = 0; i < 143; i++) {
var randomnumber=Math.floor(Math.random()*2000);
cubesmixed[i].animate({ width: 25, height: 25 }, 500, "bounce");
console.log(i);
}
inside that array the value of randomnumber is 0. How can I do this?
Cheers