function Shape(){//from ww w.j a v a 2 s . co m
this.isDrawable = true;
}
Shape.prototype.getDrawable = function(){
return this.isDrawable;
};
function Rectangle(){
this.hasFourEdges = false;
}
//inherit from Shape
Rectangle.prototype = new Shape();
Rectangle.prototype.getFourEdges = function (){
return this.hasFourEdges;
};
var instance = new Rectangle();
console.log(instance.getDrawable()); //true