What is the purpose of Reflect in JavaScript?
a) To perform object operations like proxies without interception
b) To create a copy of an object
c) To modify the prototype of an object
d) To delete properties of an object
Answer:
a) To perform object operations like proxies without interception
Explanation:
The Reflect
object provides methods for interceptable JavaScript operations, like setting or getting properties, without interception. It is often used in combination with proxies to handle operations when interception is not desired.