Here's the same example, but
without the use of var inside do_something_else:
var thing = 12;
do_something_else();
alert("global thing=" + thing);
function do_something_else () {
//var thing = 100;
thing = 100;
alert("do_something_else's thing=" + thing);
}
What would you expect to be displayed ?