Calling Function in a forloop
<p>I am trying to call a function inside the FOR LOOP. Since the format is same except for names of the data passed.</p>

<pre><code>renderCharts(data1, axis1, 'mainchart1');
</code></pre>

<p>What i am doing</p>

<pre><code>var data1 = [12, 45, 30, 80];
var axis1 = ['15 Jan', '22 Jan', '29 Jan', '5 Feb'];

var data2 = [89, 45, 30, 80];
var axis2 = ['15 Jan', '22 Jan', '29 Jan', '5 Feb'];

for(var i = 1; i &lt;= 2; i++){
    renderCharts("data"+i, "data"+i, "mainchart"+i)
}
</code></pre>

<p>Some reason its not working.</p>
