Declaring variables inside a $.each loop in jQuery
<p>I have a simple jQuery each loop and I wonder if it's possible to declare some variables using it. Something like this:</p>

<pre><code>jQuery.each(["var_name1", "var_name2", "var_name3"], function(){
  $[this] = this;
});
</code></pre>

<p>Something like a variable varbiale in php.</p>

<p>I know I could store everything inside an object, but it won't help me.</p>

<p>Any ideas?</p>

<p>EDIT:</p>

<pre><code>jQuery.each(["var_name1", "var_name2", "var_name3"], function(key, val){
        var $[val] = val;
    });
alert(var_name1);
</code></pre>

<p>The Error:</p>

<pre><code>SyntaxError: missing ; before statement
[Break On This Error]   
var $[val] = val;
</code></pre>
