Date: 08/08/07 (Javascript Community) Keywords: no keywords
I know the while condition is messed up. It seems as if the length of the array RandStore does not update for the comparison. Thats why there is a nested escape. I want the loop to continue until all the values in HomeImage are used.
Here's a sample output. The number in the bracket indicates the index being stored/used.
HomeImage length: 4 RandStore length: 0 index: 0 [0] HomeImage length: 4 RandStore length: 1 index: 0 HomeImage length: 4 RandStore length: 1 index: 2 [2] HomeImage length: 4 RandStore length: 2 index: 3 [3] HomeImage length: 4 RandStore length: 3 index: 0 HomeImage length: 4 RandStore length: 3 index: 1 [1] HomeImage length: 4 RandStore length: 4 Source: http://community.livejournal.com/javascript/138134.html
|