Сделать объект readonly javaScript
var obj = {};
Object.defineProperty(obj, "prop", {
value: "test",
writable: false
});
Naughty Nightingale
var obj = {};
Object.defineProperty(obj, "prop", {
value: "test",
writable: false
});