Why is the alert not displayed if we run the extFunc () function?
function extFunc() { var a = 123; return function intFunc() { alert(a); } } extFunc() // ---- But alert is displayed if we assign a function to a variable and run through this variable? What possibilities does the assignment of a variable function open here? Thank!
var newFunc = extFunc(); newFunc(); // 123
extFunc()();The variable itself is not in the business here. - vp_arth