Can we use 'var' in this scenario
<p>Can we use var twice in the function.
e.g</p>

<pre><code>var varname= sometype;
if(true)
{
    varname= type1;
}
else
{
   varname=type2;
}
</code></pre>

<p>If this is not possible I would say this is a limitation of var.</p>
