How to add fixed variable name with changing variable name
<pre><code>&lt;script&gt;
    var data1_1 = $value;

    var data1_3 = $value;

    var data1_5 = $value;

&lt;/script&gt;
</code></pre>

<p>The above code is hard-code which is correct. 
Now I want to make the code more flexiable using for loop.
However, there is something wrong on <code>data1_keysArr[i] = $value</code>.</p>

<p>Can anyone help me?</p>

<p>Thanks in advance!</p>

<pre><code>&lt;script&gt;

var keysArr = [1, 3, 5];

for(var i=0; i&lt;keyArr.length; i++){

    data1_keysArr[i] = $value;


}

&lt;/script&gt;
</code></pre>
