educative.io

Educative

`super` - What exactly does it do?

I was going through the page on super for classes but there wasn’t really any explanation of what it is or does. Only how and when it should be called which wasn’t super informative (no pun intended)

I had to look it up on MDN to get a better explanation.

The “super” keyword refers to the parent class. It is used to call the constructor of the parent class and to access its properties and methods.