title: JavaScript's equivalent to PHP's __get() magic method
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/994143/javascript-getter-for-all-properties">JavaScript getter for all properties</a>  </p>
  </blockquote>
  
  
  
  <p>Does JavaScript provide a method to access undefined object properties? In PHP the solution is to declare and implement <code>__get()</code> method in class.<br>
  Solutions using <code>try { .. } catch { .. }</code> are not sufficient for me, because I already have very large amount of code which actually needs to stay as-is.</p>