You seem to be wrong. I will try the following example:
var b=1;
function foo() {
var b=2;
debugger
}
foo();
"b" is equal to 2, even if you declare one function inside another, if you declare "b" with "var", you will see what you want.
Any further info? maybe you have some sample code?
source
share