![]() |
VOOZH | about |
JavaScript proxy() constructor is used to return the proxy constructor function for the object(e.g. property lookup, assignment, enumeration, function invocation, etc).
Syntax:
let p = new Proxy(target, handler);
Parameter: The proxy object accept two parameters as mentioned above and described below:
Example:
Output:
[object Object] John Nash
Note: The above code can be run directly in terminal provided NodeJs is installed, else run it in a HTML file by pasting the above in script tag and check the output in console of any web browser.