JavaScript Professional — Medium
Key points
- The Proxy handler modifies the behavior of the original function by doubling its output.
- The `double` Proxy is created with a handler that applies the specified logic to the original function.
- The `double(5)` call results in the original function returning 6, which is then doubled to 12.
Ready to go further?
Related questions
