filmov
tv
What is super in JavaScript? Explained with Example 🚀 #Shorts

Показать описание
super is used to call the parent class constructor in JavaScript.
In this example, Dog extends Animal and uses super(name) to inherit the name property.
Without super(), the child class can’t access the parent's constructor.
#JavaScript #OOP #SuperKeyword #WebDev #Frontend #CodingTips #Shorts
In this example, Dog extends Animal and uses super(name) to inherit the name property.
Without super(), the child class can’t access the parent's constructor.
#JavaScript #OOP #SuperKeyword #WebDev #Frontend #CodingTips #Shorts