The following is probably a bit senseless, but why does the first call below work while the second one fails?
var foo = function bar() {
console.log("Martini");
}
foo(); // works
bar(); // undefined; i.e. "Uncaught ReferenceError: bar is not defined"
Has that to do with scope?
Corollary beginner's question: The function definition "parses" - but is that actually valid syntax - and is there any context where naming an assigned anonymous function makes sense?