how to make object readonly in javascript 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
});