create object with read only code example
Example: make object readonly javascript
var obj = {};
Object.defineProperty(obj, "prop", {
value: "test",
writable: false
});
var obj = {};
Object.defineProperty(obj, "prop", {
value: "test",
writable: false
});