TGViewer
JavaScript JavaScript @javascript · 31K subscribers
Post #2321 5.26K
CHALLENGE

const user = {
name: "Alice",
age: 32,
role: "developer"
};

const handler = {
get(target, prop) {
return prop in target ?
`Value: ${target[prop]}` :
"Not found";
}
};

const proxy = new Proxy(user, handler);
delete user.age;

console.log(Reflect.get(proxy, "name") + ", " + proxy.age + ", " + proxy.skills);
  • 👍 4
More from @javascript
  1. Oct 7, 2026Post #3544
  2. Oct 7, 2026CHALLENGE const sym1 = Symbol('id'); const sym2 = Symbol('id'); const obj = { [sym1]: 'fir…
  3. Oct 6, 2026Post #3542
  4. Oct 6, 2026CHALLENGE async function* gen() { const x = yield 1; const y = yield x + 1; return x + y;…
  5. Oct 5, 2026🎵 Tonny Espeset has recreated the '80s hit Take on Me by A-ha in pure JavaScript (along w…
  6. Oct 5, 2026Post #3539
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →