Possible Duplicate:
What do parentheses surrounding a JavaScript object/function/class declaration mean?
Why following code does not work
function func() {
document.writeln("HELLO");
}();
UPDATE:
Why in following example O should not use parentesis around "function{}"?
var v = function() {
return "HELLO";
}();
document.writeln(v);