Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Function As Parameter In Self Invoking Function

(function (a) {
a();
}(

function(a, b, c)
{

alert("aaaaa");
}


));
/*you can just think of this as "in this self invoking function, we now can use the function(a, b, c) function......in any way we see fit*/
/*notice how the parameters in the bottom function don't really matter in terms of being executed even though they are not being used at all*/
 
PREVIOUS NEXT
Tagged: #Function #As #Parameter #In #Self #Invoking #Function
ADD COMMENT
Topic
Name
6+5 =