Python's __getattr__ in Javascript
<p>Is there a way to simulate Python's <code>__getattr__</code> method in Javascript?</p>

<p>I want to intercept 'gets' and 'sets' of Javascript object's properties.</p>

<p>In Python I can write the following:</p>

<pre><code>class A:
    def __getattr__(self, key):
        return key

a = A()
print( a.b )
</code></pre>

<p>What about Javascript?</p>
