Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 10, 2014 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/42f881514ff2175b2a31 to your computer and use it in GitHub Desktop.
Save devdays/42f881514ff2175b2a31 to your computer and use it in GitHub Desktop.
Object JavaScript Subclass in ECMAScript 6
class ColorPoint extends Point {
constructor(x, y, color) {
super(x, y);
this.color = color;
}
toString() {
return this.color + ' ' + super();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment