I'm just trying to get my head around this function expression.
It seems that if I create a function expression (p) that seems to contain a function declaration, the function declaration a() returns undefined.
var p;
p = function a() { return 'Hello' }
typeof p; // returns 'function'
typeof a; // returns 'undefined'
Can anyone explain why this is the case?
And also please let me know if my terminology is off too.
function a() { return "Hello" } var p = a;if you need both, or don't specify the anonymous function with a name.