zhoufenfens
7/17/2013 - 12:50 PM

inherit

inherit

function Polygon(sides){
    this.sides = sides;
    this.setSides = function(s) {this.sides=s;}
};
function Tri(sides){
Polygon.apply(this,[sides]);
}
var tri=new Tri(4);
console.log(tri.sides);