I have started learning Jquery and I am struck with something. I searched to learn about it but I am rather confused
 (function($){
    //all code here
    })(window.jquery)
Some documents say that this code executes immediately.
Some say that it isolates the variables from the external world. 
and some say that it is used to prevent '$'so that it could be used as a jquery object.
So what exactly does it do ?? Is there anything else that is done by this small arrogant code?
 
     
     
    