What is the purpose of a self executing function in javascript?

In javascript, when would you want to use this: (function(){ //Bunch of code… })(); over this: //Bunch of code… 20 s 20 It’s all about variable scoping. Variables declared in the self executing function are, by default, only available to code within the self executing function. This allows code to be written without concern of … Read more