membuat objek readonly javascript

var obj = {};
Object.defineProperty(obj, "prop", {
    value: "test",
    writable: false
});
Naughty Nightingale