Calculated/transient fields in JavaScript
<p>I am trying to achieve something like the following using OO JavaScript:</p>

<pre><code>class Sample
{
  public int x {get; set;}
  public int y {get; set;}

  public int z
  {
    get {return x+y;}
  }
}
</code></pre>

<p>I could not understand on how to implement property 'z' in above class.</p>
