Skip to content

super

In JavaScript, the super keyword gives a class or object method access to its parent, either by calling the parent class’s constructor or by reading a property from the parent prototype. It’s tied to class and extends, and it’s valid only inside class bodies and object literal methods.

The call form, super(...), is valid only in the constructor of a derived class. It runs the parent constructor and binds this, so reading this before the call throws a ReferenceError, and so does calling it twice.

The property form, super.name or super[expression], works in any method of a class or an object literal, including static methods. It looks the property up on the prototype of the object where the method was defined, but keeps the current this.

super isn’t a variable, so reading it on its own is a SyntaxError. It was added in ES2015.

JavaScript super Keyword Syntax

The super keyword calls the parent constructor or reads a property from the parent:

Language: JavaScript Syntax
super([<arguments>])
super.<propertyName>
super[<expression>]

JavaScript super Keyword Examples

The Dog class calls its parent’s constructor and method through super:

Language: JavaScript
> class Animal {
…   constructor(name) {
…     this.name = name;
…   }
…   describe() {
…     return `${this.name} is an animal`;
…   }
… }
undefined

> class Dog extends Animal {
…   constructor(name, breed) {
…     super(name);
…     this.breed = breed;
…   }
…   describe() {
…     return `${super.describe()}, a ${this.breed}`;
…   }
… }
undefined

> new Dog("Rex", "beagle").describe()
'Rex is an animal, a beagle'

The Dog constructor hands name to the Animal constructor before setting its own property. The overriding describe() method extends the parent’s version instead of repeating it.

In a derived constructor, touching this before super() runs throws an error:

Language: JavaScript
> class Shape {}
undefined
> class Circle extends Shape {
…   constructor(radius) {
…     this.radius = radius;
…     super();
…   }
… }
undefined

> try { new Circle(2); } catch (error) { console.log(error.name); }
ReferenceError
undefined

The class definition parses fine. The ReferenceError appears only when the constructor runs and reaches this while it’s still uninitialized.

JavaScript super Keyword Use Cases

  • Passing constructor arguments to a parent class
  • Extending an overridden method with the parent’s behavior
  • Calling a parent class’s static method from a subclass
  • Reaching a prototype’s method from an object literal method

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Leodanis Pozo Ramos • Updated Nov. 4, 2026