Subj : Re: Constants To : DELHOSTE Fabrice From : Brendan Eich Date : Wed Jan 21 2004 10:03 pm DELHOSTE Fabrice wrote: > Hi, > > In Javascript, is is possible to have constants at the "class" level such as: > > Color.RED > Color.BLUE > > If yes, how can it be implemented in a host object (in order to have them at the required level)? If you are asking about SpiderMonkey, JS_DefineConstDoubles and JS_DefineProperty come to mind as APIs with the necessary semantics (given the right parameters). /be .