Hard
What is the name of the pattern used in this piece of code:
var myModule = (function($, _) {
function doSomethingPrivate() {
// ...
}
return {
publicMethod : function() {
doSomethingPrivate();
}
};
})(jQuery, _);
Author: Jean-marie CléryStatus: PublishedQuestion passed 2043 times
Edit
Similar QuestionsMore questions about Javascript