dimanche 28 février 2016

syntax for the module pattern in Javascript

I am learning module pattern in Javascript, and have come across these two ways to create a module:

var Module = (function () {
  // code
})();

var Module = (function () {
 // code
}());

is there a significant difference in these two approaches? if not, which is considered the better practice? Thanks.

Aucun commentaire:

Enregistrer un commentaire