Can someone explain what the difference is between these closures? Is there a difference? I haven't previously seen the second example (parentheses inside).
(function(a, b) {
//...
})(x, y);
// Parentheses inside
(function(a, b) {
//...
}(x, y));
And here, is there a difference between these closures? Is there a scenario where there would be a difference?
FOO.Bar = (function() {
//...
})();
FOO.Bar = (function() {
//...
}());