I have paid attentions that some developers use Module Pattern like this:
var test = (function() {
myMethod = function() {
// some stuff
};
return {
publicMethod: myMethod
}
})();
and some like this:
var test = (function() {
myMethod = function() {
// some stuff
};
return {
publicMethod: myMethod
}
}());
The difference is at the end for brackets inside or outside of a function. It has probably nothing to do with a pattern itself but with a function. Could anyone explain the difference, or provide a link where all this stuff has been well explained?