(function(){
function foo(){/* 1 */};
function foo(){/* 2 */};
})();
The next step is to resolve functions declaration. In Internet Explorer common differences between function expressions and function declarations do not exist. If we assign the function foo, or we use it as argument like setInterval(function foo(){}, 15); it does not matter. Internet Explorer will threat each function as a declared one, blocks or not, brackets or not, names ... or not! The problem is that whatever we put around the second function, the one with comment /* 2 */, this will be the only one valid, even if part of a catch, and even if called directly by the first foo.
Scope Variables© Andrea Giammarchi