Why this simple javascript code does not work
<p>I have the following code:</p>

<pre><code>funtion show(){
    var a=document.getElementById('somediv').style.display;
    a="block";
}
</code></pre>

<p>The above code does not work, it works if we use</p>

<pre><code> {
     var a=document.getElementById('somediv');
     a.style.display="block";
 }
</code></pre>

<p>What is wrong with the above code?</p>
