javascript inherance? with Private vars and methods too
<p>Hy i need to inherent a class from another.</p>

<p>Parent has private var "_data" and private method "_test" and public method "add"
Now the child have a public method "add", that uses the private method from the parent "_test" and the private var "_data".</p>

<p>How do i do this?</p>

<pre><code>var Parent = function(){
    var _data = {};
    var _test = function(){alert('test')};
    this.add = function(){alert('add from parent')}
}

var Child = function(){
    this.add = function(){// here uses the _data and _test from the Parent class
        alert('add from child')
    }
}

// something to inherent Child from Parent
// instance Child and use the add method
</code></pre>

<p>And i think im miss the prototype concept (http://stackoverflow.com/questions/892467/javascript-inheritance)</p>
