views:

93

answers:

0

Possible Duplicate:
JavaScript: Why the anonymous function wrapper?

I read the code of some JavaScript libraries, and found in some js files there are such statements:

;(function(){

})();

I've got a few questions :

  1. What the code does?
  2. Why the code is designed in such way?
  3. How to invoke functions defined in the code?