Skip to content

Instantly share code, notes, and snippets.

@alexnm
Created January 10, 2016 19:04
Show Gist options
  • Save alexnm/ff8b3d88f342d1585cb6 to your computer and use it in GitHub Desktop.
Save alexnm/ff8b3d88f342d1585cb6 to your computer and use it in GitHub Desktop.
class Rectangle extends Shape {
constructor( x, y, color ) {
super( color );
this.x = x;
this.y = y;
this.color = color
}
get length( ) {
return x;
}
get width( ) {
return y;
}
set color( c ) {
this.color = c;
}
static numberOfEdges( ) {
return 4;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment