hasbeginnerconst p = new Proxy({}, {
has: (target, key) => key.startsWith('a')
})
console.log('apple' in p) // β true
console.log('banana' in p) // β falseThe has trap intercepts the in operator, allowing you to control which property names are considered present on a proxy.
Without a has trap, the in operator checks the target directly.
Challenge: Verify that 'a' in new Proxy({a: 1}, {}) is true.