so I'm finally understanding prototype and how to use it. I'm sure that I'm still trying to solve this as a java inheritance problem, so if there is a more prototypal way to go about this let me know.
If B inherits A I want B's constructor to first execute A's constructor. This is important for setting up B's local variables. At first I thought of doing something like
function B()
{
B.prototype.constructor();
}
B.prototype = new A();
This of course does not work properly as it is essentially the same as saying
function B()
{
new A();
}
Is there any way to actually extend a constructor in the java way? Is there a better way to go about this?
{EDIT} I realized the problem was that I was trying to access private variables. I'm assuming private variables do not get passed down from prototype?