Premium Only Content

The JavaScript SUPER keyword is super! 🦸♂️
00:00:00 intro
00:00:22 setup
00:02:39 super constructor
00:05:59 super methods
00:09:03 conclusion
// super = keyword is used in classes to call the constructor or
// access the properties and methods of a parent (superclass)
// this = this object
// super = the parent
class Animal{
constructor(name, age){
this.name = name;
this.age = age;
}
move(speed){
console.log(`The ${this.name} moves at a speed of ${speed}mph`);
}
}
class Rabbit extends Animal{
constructor(name, age, runSpeed){
super(name, age);
this.runSpeed = runSpeed;
}
run(){
console.log(`This ${this.name} can run`);
super.move(this.runSpeed);
}
}
class Fish extends Animal{
constructor(name, age, swimSpeed){
super(name, age);
this.swimSpeed = swimSpeed;
}
swim(){
console.log(`This ${this.name} can swim`);
super.move(this.swimSpeed);
}
}
class Hawk extends Animal{
constructor(name, age, flySpeed){
super(name, age);
this.flySpeed = flySpeed;
}
fly(){
console.log(`This ${this.name} can fly`);
super.move(this.flySpeed);
}
}
const rabbit = new Rabbit("rabbit", 1, 25);
const fish = new Fish("fish", 2, 12);
const hawk = new Hawk("hawk", 3, 50);
rabbit.run();
fish.swim();
hawk.fly();
-
LIVE
The Bubba Army
2 days agoMichigan Church Attack, 4 DEAD 8 WOUNDED - Bubba the Love Sponge® Show | 9/29/25
2,043 watching -
2:02:10
BEK TV
3 days agoTrent Loos in the Morning - 9/29/2025
3.06K3 -
18:09
Forrest Galante
11 hours agoI Survived 24 Hours In The World's Deadliest Jungle
37.7K12 -
25:31
MattMorseTV
16 hours ago $28.25 earned🔴We just got THE MOTIVE.🔴
48.4K196 -
15:49
Nikko Ortiz
21 hours agoI Have A Gun
34.3K21 -
15:51
GritsGG
18 hours agoWinning a Warzone Match From a Tree! #1 Player's POV!
24.6K3 -
2:31:01
The Connect: With Johnny Mitchell
1 day ago $43.23 earned"It's About To Get Worse"- CIA Agent Andrew Bustamante Explains Why It's Time To Leave America
61.2K87 -
16:21
The Pascal Show
1 day ago $5.07 earned'THE FEDS MADE THIS UP!' Candace Owens Drops BOMBSHELL Pushing Back On Details In Charlie Kirk Case
27.9K36 -
LIVE
Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
244 watching -
25:39
DeVory Darkins
16 hours ago $23.91 earnedMass shooting erupts in Michigan as bombshell study shows left wing political violence skyrocketed
71.2K142