const o = Object.freeze({ x: 1, nested: { y: 2 } }); o.x = 99; o.nested.y = 99; console.log(o.x, o.nested.y);