Thread
:
Unrecognized function syntax: class.event = (function(arg){[stuff]})(arg?);
View Single Post
07-14-2011, 07:06 PM
PM User
|
#
4
DaveyErwin
Regular Coder
Join Date: Aug 2010
Posts: 810
Thanks: 12
Thanked 168 Times in 166 Posts
Code:
var a = 'A'; var b = 'B'; test = (function(t){ alert(t); alert(b); })(b); alert(test) //test(a);
Test will equal the return value
of the anonymous function, in
this case there is no reurn value
so test is undefined.
DaveyErwin
View Public Profile
Find More Posts by DaveyErwin