123-Essential-JavaScript-Interview-Questions
123-Essential-JavaScript-Interview-Questions copied to clipboard
16th Question - bug
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
@ganqqwerty P.s. thanks for the great repo, I hope you would take a look into the above issue