Using Object.freeze() prevents editing an object:
> const obj = { a: 1 }; > Object.freeze(obj); > obj.b = 2; > obj { a: 1 }
However,