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