deletePropertyintermediateconst log = []
const p = new Proxy({}, {
deleteProperty: (t, k) => { log.push(k); return true }
})
delete p.foo
console.log(log) // β ['foo']The deleteProperty trap intercepts delete operations, allowing custom logic when a property is deleted from a proxy.
When the deleteProperty trap returns false, the delete expression evaluates to false and the property is not removed.
Challenge: Verify that delete p.x returns false when the trap returns false.