2013-09-02 JavaScript Module Pattern Just a simple code and note here. For more info about module pattern refer here. 1234567891011var obj = (function(){ var obj = function(){ //constructor } obj.prototype.foobar = function() { // do things here }; return obj;})(); Newer Differences Between sync & async, blocking & non-blocing and event-driven Older How To Call Parent Function in Child Class