MediumPrototypes & Inheritance💻 Output Question

super calls the parent method

💡

Hint

super.method() calls the parent class implementation — enabling extension rather than full replacement.

What does this output?

class Shape {
  describe() { return 'shape'; }
}
class Circle extends Shape {
  describe() { return super.describe() + ' (circle)'; }
}
console.log(new Circle().describe());

Correct Output

shape (circle)

Why this output?

Explanation: super.describe() calls the parent's version. The result is concatenated in the subclass.

Key Insight: super.method() calls the parent class implementation — enabling extension rather than full replacement.

More Prototypes & Inheritance Output Questions

Easyinstanceof traverses the prototype chainMediumhasOwnProperty vs in operatorMediumClass method override and instanceofMediumObject.create sets prototype directly

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz