Possible Duplicates:
What does this mean? (function (x,y)){…}){a,b); in JavaScript
What do parentheses surrounding a JavaScript object/function/class declaration mean?
Hi All
I don't know what the following does:
(function(){
// Do something here
...
})(someWord) //Why is this here?;
My questions are:
- What's the meaning of putting a function inside brackets .i.e.
(function(){});
? - What do the set of brackets do at the end of a function?
I usually see these in jquery codes, and some other javascript libraries.