I have this superclass with two private elements and two methods to access them:
function superclass(a,b) {
var x = a;
var y = b;
this.getX = function() {return x;}
this.getY = function() {return y;}
}
I want to create a subclass called say "ChildClass" that in its constructor, calls the superclass constructor, giving it the two parameters. So I can say parent = new SuperClass(2,3) I alsow need to be able to say child = new ChildClass(3,4) and when i write something like alert(child.getX()), the browser showuld prompt "3". Does anyone know how to do this?