How to implement Shape class above Circle ? I mean Circle and Rectangle class should be inherited from Shape.
I will be happy if someone give real code :)
here i made Circle class with prototype definition as well.
function Circle(radius){
 this.radius = radius;
 Circle.prototype.area = function(){return (Math.PI)* (Math.pow(this.radius,2));};
 }
 var circle1 = new Circle(5);
 circle1.radius; //5
 circle1.area() //78.53
 
    