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();
-
6:32
WhaddoYouMeme
16 hours ago $3.67 earnedChristians, These Reactions Should Disturb You
11.3K37 -
9:59
Clownfish TV
15 hours agoWarner Bros and Paramount are MERGING?! | Clownfish TV
14K4 -
19:19
World2Briggs
1 day ago $1.11 earnedTop 10 Amazing States With The Lowest Taxes.
12K1 -
2:00:41
BEK TV
1 day agoTrent Loos in the Morning - 9/16/2025
13.1K1 -
LIVE
The Bubba Army
23 hours agoDid Charlie Kirk's Killer, Confess On Discord? - Bubba the Love Sponge® Show | 9/16/25
1,603 watching -
8:41
Zoufry
1 day agoInside The Cartels Training Camps for Assassins
16.2K3 -
12:37
itsSeanDaniel
1 day agoFake Republican REFUSES to Stand Up for Charlie Kirk
21.1K48 -
1:01:55
MTNTOUGH Podcast w/ Dustin Diefenderfer
23 hours agoJason Khalipa: American Men: Get Off the Couch and Rise Up Now | MTNPOD #133
32.2K45 -
5:17
Blackstone Griddles
14 hours agoEasy Weeknight Meals: Creamy Parmesan Beef Pasta
20.2K6 -
7:08
Rena Malik, M.D.
1 day ago $1.45 earnedFour totally surprising causes of Back Pain
16.2K1