Javascript basics: variable scope
<p>I am learning javascript and can someone please explain the following code snippet for me?</p>

<pre>
<code>
var state=true;
function bob(){ var state=false; }
bob() 
</code>
</pre>

<p>What should be the state value and why?</p>

<p>Many thanks,
L</p>
