I\'m using class members to hold constants. E.g.:
function Foo() { } Foo.CONSTANT1 = 1; Foo.CONSTANT2 = 2;
This works fine, except that it see
Also with namespaces
var Constants = { Const1: function () { Const1.prototype.CONSTANT1 = 1; Const1.prototype.CONSTANT2 = 2; }, Const2: function () { Const2.prototype.CONSTANT3 = 4; Const2.prototype.CONSTANT4 = 3; } };