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
IF the constants are to be used inside of the object only:
function Foo() { var CONSTANT1 = 1,CONSTANT2 = 2; }
If not, do it like this:
function Foo(){ this.CONSTANT1=1; this.CONSTANT2=2; }
It's much more readable and easier to work out what the function does.