JS Built-ins
← Proxy25 / 100
Proxybeginner

Proxy β€” typeof Proxy

πŸ“– Usage Example
const 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.

typeof Proxy

Proxy is a built-in constructor, so typeof Proxy returns 'function'.

Challenge: Verify that typeof Proxy returns 'function'.

πŸ’‘ Hints (1)
  • β€’ `Proxy` is a built-in constructor function.