Reputation: 17080
I have the following 2 objects:
function circle(radius){
this.radius = radius;
this.foo = function (){
return "circle foo";};
return true;}
function pizza(){
this.foo = function (){
return "pizza foo";};
return true;}
pizza.prototype = new circle(9);
When I do the following
var foo = myPizza.foo();
It prints the following as expected:
pizza foo
How can I activate the base class and print "circle foo" from myPizza
object?
Upvotes: 0
Views: 47