Skip to content

Instantly share code, notes, and snippets.

@Jagathishrex
Created December 28, 2020 15:30
Show Gist options
  • Save Jagathishrex/052c7bebc5edff03075b951d4420ec4c to your computer and use it in GitHub Desktop.
Save Jagathishrex/052c7bebc5edff03075b951d4420ec4c to your computer and use it in GitHub Desktop.
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