writable
If writable is true, the property’s value can be changed; otherwise it is read‑only.
const obj = {};Object.defineProperty(obj, "x", { value: 10, writable: false });obj.x = 20; // ignored or error in strict modeconsole.log(obj.x); // 10If writable is true, the property’s value can be changed; otherwise it is read‑only.
const obj = {};Object.defineProperty(obj, "x", { value: 10, writable: false });obj.x = 20; // ignored or error in strict modeconsole.log(obj.x); // 10