javascript - Why does the variable executes the window object right away and not store it instead? -
i understand what's happening code in variable not stored immediately, instead executed first before can called. example code can (in global scope):
var alertme = alert("i\'m being executed stored called again, why?");
because storing result of calling function, not storing function.
this after:
var alertme = function () { alert("i\'m being executed stored called again, why?"); };
and when want call it:
alertme();
Comments
Post a Comment