Here's an example in Javascript:
var thing = 12;
do_something_else();
alert("global thing=" + thing);
Pretty straightforward.
Now let's see how do_something_else() might be defined.
function do_something_else () {
var thing = 100;
alert("do_something_else's thing=" + thing);
}
When all this code runs together,
what would you expect to see, and in what order?