Skip to content Skip to sidebar Skip to footer

Javascript Var A = Function B() {}

var a = function b() { console.log( typeof b === 'function' ); }; a(); // true console.log( typeof b === 'function' ); // false Why the second result is false?

Solution 1:

This is a named function expression.

Its name is only visible inside the function.

For much more information, see this article

Post a Comment for "Javascript Var A = Function B() {}"