The trap must actually assign the value on the target.
Acceptance criteria
- 1.#out should show 40.
The trap must actually assign the value on the target.
const target = { age: 0 }; const proxy = new Proxy(target, { set(obj, key, value) { return true; } }); proxy.age = 40; document.querySelector('#out').textContent = String(proxy.age);
Output ready when you are
Press Run to render your code, or Submit to validate your solution.