Created
November 1, 2012 19:59
-
-
Save ivanjr0/3996073 to your computer and use it in GitHub Desktop.
Module Pattern - Many Ways and perhaps so more
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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