ES6 Classes & Constructors
What does 'super.draw()' do in this code?
class Shape {
constructor(color) {
this.color = color;
}
draw() {
return `Drawing a ${this.color} shape`;
}
}
class Circle extends Shape {
constructor(color, radius) {
super(color);
this.radius = radius;
}
draw() {
return `${super.draw()} with radius ${this.radius}`;
}
}