Answer Embedded Below in UPDATE 2/ANSWER
Thanks to Joseph for helping me find the answer (even though I don\'t like it =).
ORIGINAL
I've seen this and I liked it
var MyThing = (function(){
function MyThing(args){
}
MyThing.prototype = {
prototypeMethod: function() {}
};
return MyThing;
})();
You can also do this
MyThing.create = function(args){
return new MyThing(args);
}
Usually it is enclosed in an another self invoking function. In order to avoid naming collisions.
(function({
})(window);
And the window object is passed as an argument,
to assign it to an upper scope.
window.MyThing = MyThing;
In this example you can use, static variables,private etc.