Hello,
I myself found the answer.
these are some ways to write less code. as you know the next line refers to a function:
Code:
function x(arg){ /*some codes here ...*/ }
what about this: ?
Code:
(function x(arg){ /*some codes here ...*/ })
we can call a function by passing parameters like:
so ...
Code:
(function (a){ /* ... */ })(window);
means passing 'window' object as parameter 'a' to the defined function. in the body of this function , 'a' points to 'window'