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

Why does deleting through this Proxy throw, even though the deleteProperty trap returns true?

const target = {}; Object.defineProperty(target, 'a', { value: 1, configurable: false }); const p = new Proxy(target, { deleteProperty(t, k) { return true; } }); delete p.a;