How to get value from other variable
<p>How to get value from other variable in JavaScript?</p>

<pre><code>&lt;script type="text/javascript"&gt; &lt;!--

    var lat0 = 10.212; 
    var lat1 = 11.9090; 
    var lat2 = 12.12;

    var lon0 = 10.212; 
    var lon1 = 11.9090; 
    var lon2 = 12.12;

    var lat = new Array("lat"+i); 
    var lon = new Array("lon"+i);

    for (var i = 0; i &lt; 2; i++) {   
        lat[i] = "lat"+i;   
        lon[i] = "lon"+i;       
        document.write(lat[i]);     
        document.write(" ");    
        document.write(lon[i]);     
        document.write(" "); 
    }
    //--&gt; 
&lt;/script&gt;
</code></pre>

<p>I want to get lat0, lat1, lat2, lon0, lon1, lon2 values.</p>
