Why c variable of if condition can work in global scope and b variable not work on global... ?
<script type="text/javascript" language="javascript">
<!--
var a = 45;
function print(){
var b = 10;
document.write(a);
}
if(a == 45)
{
var c = 10;
}
print();
document.write("a is : " + a + "<br />");
document.write("b is : " + b + "<br />");
document.write("c is : " + c + "<br />");
//-->
</script>