javascript
<script type="text/javascript">
var a = 10;
sayHi();
function sayHi() {
var a = 20;
alert(a);
}
alert(a);
</script>
<script type="text/javascript">
var a = 10;
sayHi();
function sayHi()
{
var a = a + 10;
alert(a);
return a;
}
alert(a);
alert(sayHi()+10);
</script>