var foo = function bar() {
// foo is visible here
// bar is visible here
console.log(typeof bar()); // Works here :)
};
// foo is visible here
// bar is undefined here
It should be like this instead, ( check the console.log )
var foo = function bar() {
// foo is visible here
// bar is visible here
console.log(typeof bar); // Works here :)
};
// foo is visible here
// bar is undefined here
It should be like this instead, ( check the console.log )