F
FAQ server
-----------------------------------------------------------------------
FAQ Topic - What is (function(){ /*...*/ })() ?
-----------------------------------------------------------------------
This is an anonymous FunctionExpression that is called
immediately after creation.
Variables declared inside a function are not accessible from
outside the function. This can be useful, for example, to hide
implementation details or to avoid polluting the global scope.
<URL: http://yura.thinkweb2.com/named-function-expressions/>
<URL: http://jibbering.com/faq/notes/closures/>
<URL: http://dmitrysoshnikov.com/ecmascript/chapter-5-functions/#question-about-surrounding-parentheses>
The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/
FAQ Topic - What is (function(){ /*...*/ })() ?
-----------------------------------------------------------------------
This is an anonymous FunctionExpression that is called
immediately after creation.
Variables declared inside a function are not accessible from
outside the function. This can be useful, for example, to hide
implementation details or to avoid polluting the global scope.
<URL: http://yura.thinkweb2.com/named-function-expressions/>
<URL: http://jibbering.com/faq/notes/closures/>
<URL: http://dmitrysoshnikov.com/ecmascript/chapter-5-functions/#question-about-surrounding-parentheses>
The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/