Most blogs say that undefined type is a state of allocated on memory but not having any value and null type is a state of allocated on memory having a null value.
however I think in case of a.js file.
a.js includes console.log(typeof tmp);
and It may print undefined. but In a.js file, var tmp is not declared. so I guess tmp variable is not allocated on memory but It is showed as undefined.
why does that??