- Home
- /
- Tutorials
- /
- JavaScript Tutorial
- /
- JavaScript Reflect
JavaScript Performance
JavaScript Reflect
Reflectprovides the same operations as a Proxy trap, as plain functions you can call directly.
It mirrors the traps a Proxy handler can define.
Its main job is forwarding an operation from inside a trap to the real target.
Example
Example
javascript
const person = { name: "Ada" };
console.log(Reflect.get(person, "name"));
console.log(Reflect.has(person, "name"));