this kind of function is mainly used to execute automatically when we create it.
(function(){
// some private code that will be executed automatically
})();
(function(a,b){
var result = a+b;
return result;
})(10,20)
this kind of function is mainly used to execute automatically when we create it.
(function(){
// some private code that will be executed automatically
})();
(function(a,b){
var result = a+b;
return result;
})(10,20)