Learn JavaScript INHERITANCE in 7 minutes! 🐇

  Рет қаралды 18,972

Bro Code

Bro Code

Күн бұрын

Пікірлер: 22
@BroCodez
@BroCodez Жыл бұрын
// inheritance = allows a new class to inherit properties and methods // from an existing class (parent -> child) // 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();
@ArinAkaMazu
@ArinAkaMazu 11 ай бұрын
Yo bro seriously how do you manage to be such a goat like lord I fricking love your tutorials you make everything look so easy
@hamedalwafi8717
@hamedalwafi8717 8 ай бұрын
True ! god bless
@SuperFastJewJitsu
@SuperFastJewJitsu 11 ай бұрын
Don't have time to watch as I'm heading out but had to instalike, Keep at it bro.
@KarthickRajendran-y2v
@KarthickRajendran-y2v 6 күн бұрын
Excellent tutorial. Thanks for sharing
@piotrmazgaj
@piotrmazgaj 2 ай бұрын
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
@manojpatra4458
@manojpatra4458 4 ай бұрын
Nice explanation. However, I wonder why you didn't use constructor in any of the classes. Will anything get changed with constructors in inheritance?
@SimpleAverageBoi69
@SimpleAverageBoi69 11 ай бұрын
Bro bro bro u a legend ❤❤❤❤❤❤❤
@speroakpo4630
@speroakpo4630 10 ай бұрын
Amazing job man!
@Gigglesaintlame
@Gigglesaintlame Жыл бұрын
❤ waiting for more videos Bro(fourth day)
@realitybeckons4120
@realitybeckons4120 11 ай бұрын
Thank you
@Not-Roys-Horse
@Not-Roys-Horse 3 күн бұрын
"They're eating the dogs. They're eating the cats"
@sanjay9970
@sanjay9970 9 ай бұрын
excellent explanation
@navnitkhandait6750
@navnitkhandait6750 8 ай бұрын
really a true bro code
@malikgulraiz3659
@malikgulraiz3659 11 ай бұрын
We want react js tutorials 👇
@miranda4923
@miranda4923 6 ай бұрын
Very much good 😂!
@helioobianchi
@helioobianchi 7 ай бұрын
I'm wondering if dev tools have validation features for code inconsistencies like calling a method that doesn't exist or trying to use an unexisting variable/attribute (is there a vscode extension for this?). in Java for example those are detected in compile time, i.e. you need to fix them to get to run the code (the IDE also warns about them to help save time)
@RedHeadphones
@RedHeadphones 11 ай бұрын
bro, can you make a video on hashmaps
@Abde473
@Abde473 6 ай бұрын
thanks bro 😂
@PrAvEeN.__.
@PrAvEeN.__. 11 ай бұрын
Bro make a tutorial to download the Java for full stack developer in laptop Asking for sis
@KD-tp6er
@KD-tp6er 16 күн бұрын
I'm learning JS, and thought you needed to use constructors within classes to define properties, am I missing something?
@FuadTesfaye-e1b
@FuadTesfaye-e1b 3 ай бұрын
bro please teach us typeScript
The JavaScript SUPER keyword is super! 🦸‍♂️
9:22
Bro Code
Рет қаралды 17 М.
Learn JavaScript CALLBACKS in 7 minutes! 🤙
7:17
Bro Code
Рет қаралды 60 М.
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 160 МЛН
Я сделала самое маленькое в мире мороженое!
00:43
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 244 М.
All Next.js 15 Changes (in 3 Minutes)
3:49
tobi tackles tech
Рет қаралды 5 М.
Inheritance in JavaScript - Prototypal Inheritance tutorial
20:06
Build JavaScript ROCK PAPER SCISSORS in 18 minutes! 👊
18:54
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 899 М.
JavaScript DESTRUCTURING in 8 minutes! 💥
8:41
Bro Code
Рет қаралды 23 М.
What are JavaScript PROMISES? 🤞
12:37
Bro Code
Рет қаралды 72 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,6 МЛН