For your question, consider this code
function foo(a) { var b = 2;
In this snippet, when trying to execute from a global scope.
bar();
suppose in the function bar () {....} if you have other code, for example
function foo(){ var b = 3; console.log(b); }
then this means that foo linside bar obscures foo (a) in the global area
source share