closures - What is the purpose of a self executing function in javascript? -
in javascript, when want use this:
(function(){ //bunch of code... })();
over this:
//bunch of code...
its variable scoping. variables declared in self executing function are, default, available code within self executing function. allows code written without concern of how variables named in other blocks of javascript code.
Comments
Post a Comment