Skip to content

Instantly share code, notes, and snippets.

@ivanjr0
Created November 1, 2012 19:59
Show Gist options
  • Save ivanjr0/3996073 to your computer and use it in GitHub Desktop.
Save ivanjr0/3996073 to your computer and use it in GitHub Desktop.
Module Pattern - Many Ways and perhaps so more
1.
MyModule = (function() {
var a, b, c;
a = function() {
};
b = function() {
};
c = function() {
};
return {
};
}());
2.
MyModule = (function() {
var
a = function() {
},
b = function() {
},
c = function() {
};
return {
};
}());
3.
MyModule = (function() {
function a() {
};
function b() {
};
function c() {
};
return {
};
}());
4.
MyModule = (function() {
var a, b, c;
a = function() {
},
b = function() {
},
c = function() {
};
return {
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment