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();
-
1:04:39
Crypto Power Hour
11 hours ago $4.69 earnedState of Early Stage Crypto Investor Rob Good
39.6K8 -
1:24:24
LIVE WITH CHRIS'WORLD
18 hours agoTHE WAKE UP CALL - 12/17/2025 - Episode 27
20.9K -
27:51
ThinkStory
19 hours agoIT: WELCOME TO DERRY Season 1 Ending Explained!
26.9K -
5:29
Gamazda
14 hours ago $1.82 earnedMetallica - Nothing Else Matters (Live Piano in a Church)
19.2K7 -
2:50:56
The Confessionals
22 hours agoHe Killed a Monster (Then They Told Him to Stay Silent)
22.9K9 -
41:42
Brad Owen Poker
16 hours ago $0.78 earnedMy BIGGEST WIN EVER!! $50,000+ In DREAM Session!! Must See! BEST I’ve Ever Run! Poker Vlog Ep 360
15.6K1 -
17:53
The Illusion of Consensus
20 hours ago $1.10 earnedWhat Women REALLY Want in Public (It’s Not What You Think) | Geoffrey Miller
17.6K7 -
1:32:16
Uncommon Sense In Current Times
19 hours ago $0.81 earnedPolygyny Debate: The Biblical Case For and Against Plural Marriage | Uncommon Sense
16.6K1 -
2:06:49
BEK TV
1 day agoTrent Loos in the Morning - 12/17/2025
10.9K -
23:42
Athlete & Artist Show
4 days ago $0.47 earnedWorld Junior Invites & Snubs, NHL Threatens To Pull Out Of Olympics
10.3K