javascript - Using already declared variables from an array? -
I have an array of currently declared variables, so I can go with the loop for them. (These variables are declared in Adobe Captive, so I can not go about changing them). Passing them back and forth is a bit of a problem, because the array is only storing the actual values of the variable. Here is a simplified example: Already declared variable: item1viewed, item 2 views, item 3viewed; My added code: var array = new array [item1viewed, item2viewed, item3viewed]; (I = 0; i & lt; arrays; lb; i + = 1) {array [i] = 1; } How can I make these already declared variables? You can not do it quite well .... I do not know what you try to do But in a way it is ... var saw = {item1: 0, item 2: 0, item 3: 0,} var array = new array ( For 'item1', 'item 2', 'item 3') (i = 0; i