JavaScript: Get local variable dynamicly by name string
<pre><code>&lt;script&gt;
//in one script
var someVarName_10 = 20;
&lt;/script&gt;
</code></pre>

<p>I want to get access to this variable from another script by name of variable. With window object its simple, is it possible with local variable?</p>

<p>I mean access this var by code like this:</p>

<pre><code>&lt;script&gt;
  alert(all_vars['someVar' + 'Name' + num]);
&lt;/script&gt;
</code></pre>
