Premium Only Content
This video is only available to Rumble Premium subscribers. Subscribe to
enjoy exclusive content and ad-free viewing.

Learn JavaScript INHERITANCE in 7 minutes! 🐇
1 year ago
32
Automotive
Education
Programming
Coding
Software Development
Web Development
Mobile App Development
Computer Science
Coding Tutorial
Code Learning
Programming Language
// inheritance = allows a new class to inherit properties and methods
// from an existing class. Helps with code reusability
class Animal{
alive = true;
eat(){
console.log(`This ${this.name} is eating`);
}
sleep(){
console.log(`This ${this.name} is sleeping`);
}
}
class Rabbit extends Animal{
name = "rabbit";
run(){
console.log(`This ${this.name} is running`);
}
}
class Fish extends Animal{
name = "fish";
swim(){
console.log(`This ${this.name} is swimming`);
}
}
class Hawk extends Animal{
name = "hawk";
fly(){
console.log(`This ${this.name} is flying`);
}
}
const rabbit = new Rabbit();
const fish = new Fish();
const hawk = new Hawk();
console.log(rabbit.alive);
rabbit.eat();
rabbit.sleep();
rabbit.run();
Loading comments...
-
LIVE
Dr Disrespect
2 hours ago🔴LIVE - DR DISRESPECT - BATTLEFIELD 6 - THE PERFECT WEAPON
1,639 watching -
LIVE
Nikko Ortiz
1 hour agoThis Is Gonna Hurt... | Rumble Live
157 watching -
LIVE
Steven Crowder
3 hours ago🔴 251 Racist Slurs: Politico's Bombshell Leak is a Massive Nothingburger
27,127 watching -
35:48
the_edge_of_show
7 minutes agoExploring the Intersection of Sports, Blockchain & NFTs at Korean Blockchain Week 2025
1.33K -
LIVE
Benny Johnson
1 hour agoLive Right Now With Democrat Rep. Ro Khanna talking Charlie Kirk, Leftist Violence, Trump Peace Deal
2,953 watching -
LIVE
LFA TV
15 hours agoLIVE & BREAKING NEWS! | WEDNESDAY 10/15/25
3,912 watching -
LIVE
The Mel K Show
1 hour agoMORNINGS WITH MEL K - Lawfare Operatives Panic-Nothing Can Stop What is Coming! - 10-15-25
650 watching -
LIVE
The Shannon Joy Show
2 hours agoCharlie Kirk Killing Exploited For Trump’s Everything War - Insurrection Against The Constitution
228 watching -
LIVE
Grant Stinchfield
1 hour agoJim Jordan to Jack Smith: Come Testify!
106 watching -
LIVE
Trumpet Daily
56 minutes agoTrumpet Daily LIVE | Oct. 15, 2025
229 watching