Javascript extend class es6 : Object Oriented Programming Series - Part 10
Вставка
- Опубліковано 4 вер 2017
- Extending Base class to make a sub Class in ES2015
Article and code samples from this tutorial
*
Please be my patreons on patreaon
* / techsith
Follow me for technology updates
* / techsith
* / techsith1
Help me translate this video.
* - Наука та технологія
The only channel that teaches both coding and zoology!
I have found your tutorial videos to be the best out there for learning JS. Easy to follow examples, well explained and nicely paced. Thanks!
Your videos particularly help me alot compared with other youtube coders. Thanks man
You're a very good teacher. Wish I found this channel earlier. You offer some of the best videos to learn with I've seen. Cheers
Thanks for a nice comment Billy. Keep learning!
This is awesome i didn't know these tricks especially with object asign and spread operatetor
I have got a better understanding from here about the subclasses.
Awesome tutorials from techshit. Superb explanation of all oops concepts in JavaScript. I would like to suggest everyone to watch all vedios at least once if you have interest in JavaScript.
Really nice tutorials from techshit. Thank you so much for such a nice tutorials
:) Thanks for watching!
Simply clear.
Now notice that when calling super class method, because inside the walk() method we have used the "this.name", the method uses the name of the subclass that calls it.
Hi, your doing a very good job , I am referring your videos to learn javascript instead of books
I am glad its helping you. Thanks for watching !:)
awesome video learnt a lot!
From what you said, I'm assuming that if there is only one level of inheritance or less, we should use a function object constructor? Not said, but I believe this is implied?
why we use the super(...args)? in the first example we did not call the super to initialise the inherited properties.
Typically variable names that start with an underscore denote a private class property. For example _legs would be a private member of Mammal, not legs. So it is odd to be passing in constructor parameters with underscores. For example at the 5:47 mark, the Mammal constructor is passed in _legs as param 1, then inside the constructor this.legs = _legs. That feels backwards. Seems to me you should pass in legs to the constructor, then inside the constructor this._legs = legs.
thanks man your grate
damn sir
very nice.
thx!
Explain the hardest parts of Javascript in a super smart way.
Thanks for watching Ningyi. :)
Is there a reason there is an underscroll in front of the variable names?
its just a coding style to have local variables to have underscore in-front so you can differentiate.
techsith got it, thank you very much!
techsith Yeah, something that should also be in JS like in other languages!
Can you teach about node js sir please
Constructors can't be overriding by adding new parameters while init it like normal java classes .. am i right?
yes that is right!
the videos in this playlist are in the wrong order. Also I would split this tutorial into 3 or 4: ES5, ES6, OOP in JS & job interview questions. The only video about Angular 4 seems like an alien here.
:) Yes, I started Angular4 just before the Angular5 release.
In react.js even if we don't call super, it will work! Why
super only runs parent constructor. everything else should work as it is. Is that what you referring to?
Interesting that they are now looked almost identical to Java in term of OOP🤔🤔They have class constructor, super, even subclass, but they dont have encapsulation, inheritance to be called OOP
+Tran Huy yes it does looks like have classes. At least from outside. :)
techsith Yeah. Its really a big topic for developers to talk a lot whether if javascript is OOP or not. To be able to be OOP the language needs to have polymorphism, encapsulation, inheritance, but seems like javascript try to go that way but not perfect right now. Maybe with new update for EMS we will see more about this🤔🤔
No i dont think so. They might in later versions, we never know. However, as of now, it seems javaScript considers its self as functional programming langauage with some inheritance featurs. I think typical inheritance is overkill anyway. Instead, you can use object.create and other object methods to achive composition.