JavaScript Professional — Hard
Key points
- Proxy object with custom handler returns value if property exists, else returns 37
- p.a outputs 1 because property 'a' is set to 1
- p.b outputs 37 because property 'b' doesn't exist
- 'c' in p checks if property 'c' exists in p, which is false
Ready to go further?
Related questions
