Object.freezebeginner// Make an object immutable
const obj = Object.freeze({ x: 1 })
obj.x = 99 // silently ignored
obj.x // β 1Use Object.freeze() to make an object immutable, preventing any additions, deletions, or value changes.
Object.freeze returns the same object that was passed in β not a copy.
Challenge: Implement frozenRef(obj) that freezes obj and returns whether the frozen result === the original.
frozenRef({ a: 1 }) // β true