- Edited
Not really a TIL, but some JavaScript I wrote to check that what I was understanding really was the case. Guess the output:
(function() {
var i = 42;
var f = function() {
i = 17;
if(false) {
var i = 'fnord';
}
};
f();
console.log(i);
})();