Subj : How do you make an object's property const? To : netscape.public.mozilla.jseng From : celsoaguiar Date : Mon May 10 2004 06:26 pm I've been trying to figure out how to make an object's property constant from JavaScript, and have not found a way, at least within SpiderMonkey latest 1.5. const O = function () { this.p = 1; // can't do "const this.p = 1", syntax error. } const o = new O(); o.p = 2; // I still can replace o.p A browse through Ecma standards was not conclusive. Is this a SpiderMonkey bug (or missing implementation)? Or is this a case where my only option to const an object's property is from C/C++ via JSPROP_READONLY? Thanks for the attention, Celso .