When I'm declaring instance methods in JS I often use this syntax:
var MyObj = function (p1) {
this.p1 = p1;
};
MyObj.prototype = {
method1: function() {},
method2: function() {},
method2: function() {}
};
Is there a similar way to declare "static" methods instead of doing this:
MyObj.static1 = function() {
};
MyObj.static2 = function() {
};
MyObj.static3 = function() {
};