Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptProxy and ReflectSingle-choice MCQ

What is the result of this code, and which invariant is being violated?

const target = Object.freeze({ x: 10 }); const p = new Proxy(target, { get() { return 42; } }); console.log(p.x);