I want to create sub-class B that inherits from super-class A. my code here:
function A(){
this.x = 1;
}
B.prototype = new A;
function B(){
A.call(this);
this.y = 2;
}
b = new B;
Console.log(b.x + " " + b.y );
when run it,it show B is undefined.