I just recently learned about self calling anonymous functions. Some snippets of code that I came across used the self calling function along with the $(document).ready. It se
The only reason you would introduce another closure is to introduce another scope boundary for loading / protecting global objects such as $.
For Example:
$(document).ready(function(){
// Do upper scope things.
(function(){
// Do lower scope things.
})();
});
Based on you saying you have recently learning about this stuff I assume you are relativly new to JavaScript.
I have put together a blog post that might help explaining some of the basic concepts form the point of view of a newcomer to JavaScript, including function scope. http://bit.ly/tLkykX