Both of them works without errors, is there any difference?
(function(){}());
(function (){})();
here are some working examples:
console.log(
(function (a) {return a*2;}(3))
);
console.log(
(function (a) {return a*2;})(3)
);