simplest inheritance in javascript?
<p>I am trying to use OOPs in javascript. What i am trying is, </p>

<p>I have 2 classes say <code>classA</code> and <code>classB</code>. I am inheriting classA in classB. Like :</p>

<pre><code> function classA(){
    this.propA = "somevalue of A";
 }

 function classB(){
    classB.prototype = new classA();              //inheriting
    classB.prototype.constructor = classB;        //updating constructor defination
    this.propB = "somevalue of B";
 }
</code></pre>

<p>Now i created the object of classB :</p>

<pre><code>var classBObject = new classB();
</code></pre>

<p>and than trying to access base class property value with :</p>

<pre><code>alert(classBObject.propA);      //here i am expecting "somevalue of A"
</code></pre>

<p>but the alert shows me empty. Can anybody please tell me what i am doing wrong here ?</p>
