In javascript, can I declare properties of an object to be constant?

Here is an example object:

   var XU = {
      Cc: Components.classes
   };

or

   function aXU()
   {
      this.Cc = Components.classes;
   }

   var XU = new aXU();

just putting "const" in front of it, doesn't work.

I know, that i could declare a function with the same name (which would be also kind of constant), but I am looking for a simpler and more readable way.

Browser-compatibility is not important. It just has to work on the Mozilla platform, as it is for a Xulrunner project.

Thank you a lot!

Cheers.

Edit
Report