JavaScript Proxy Guide
The Proxy object allows you to intercept and customize operations performed on objects, such as property access, assignment, and function invocation. The guide walks through Creating Proxies, Common Traps, Use Cases. `new Proxy(target, handler)` creates a proxy. The `target` is the original object. The `handler` object defines traps for operations like `get`, `set`, `has`, `deleteProperty`, `apply`, `construct`, and more. `get(target, prop, receiver)` intercepts property reads. `set(target, prop, value, receiver)` intercepts writes. `has(target, prop)` intercepts `in` operator. `deleteProperty(target, prop)` intercepts `delete`. The guide is organized into 3 sections that build on each other, each pairing a prose explanation with runnable code. Browse the individual methods covered by this guide in the Proxy category. Key APIs covered include Proxy(), handler.get(), handler.set(), handler.has(), handler.construct(), handler.defineProperty(). Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page.