hi,
this is my code,
function fngg(){
var f = function(){ alert(studentName); }
var studentName = "Kate Adam Bikensale";
return f;
}
now i can call the above function using window's onload event as
follows,
window.onload = fngg();
this works fine,
but how come the following code works
fngg()();
just when i refresh the page the fngg function gets called as well as
the inner closure "f" is also getting called,
my question is on which event the "fngg()()" is linked to ?
as i am not calling this through window.onload, so how come this
works ?
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]