Created
December 28, 2020 15:30
-
-
Save Jagathishrex/052c7bebc5edff03075b951d4420ec4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let target = {}; | |
let handler = {}; // empty handler | |
let proxy = new Proxy(target, handler); | |
proxy.test = 5; // the property will be added in target | |
target.test; // 5 | |
proxy.test; // 5 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment