how java script initilised variable prints undefined?
<pre><code>01  print(x === undefined); // prints "true"
02  var x = 3;
03   
04  //will return a value of undefined
05  var myvar = "my value";
06   
07  (function() {
08    alert(myvar);//undefined       -- here i don't understand ho it print undefined 
09    var myvar = "local value"
10  })();
</code></pre>
