Answers for "make object readonly javascript"

0

make object readonly javascript

var obj = {};
Object.defineProperty(obj, "prop", {
    value: "test",
    writable: false
});
Posted by: Guest on July-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language