js readonly object 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
});