Possible Duplicate:
What do parentheses surrounding a JavaScript object/function/class declaration mean?
I have found the following code in a website .
var testModule = (function(){
    var counter = 0;
    return {
       incrementCounter: function() {
            return counter++;
        },
        resetCounter: function() {
            console.log('counter value prior to reset:' + counter);
            counter = 0;
        }
    };
})();
So it follows the syntax var a = (blah balh..)()
What does it actually mean? What is the meaning of variable declaration like a =()()..
 
     
     
    