deletePropertybeginnerconst 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.
After a passthrough delete, the property no longer exists on the proxy (or its target).
Challenge: Verify that after delete p.x, 'x' in p is false.