Object Oriented JavaScript Tutorial #5 - Class Constructors
HTML-код
- Опубликовано: 12 май 2018
- 🐱💻 Course Links:
- VS Code editor - code.visualstudio.com/
- GitHub repository (course files) - github.com/iamshaunjp/object-...
- JavaScript for Beginners - • JavaScript Tutorial Fo...
🤑 Donate @ www.paypal.me/thenetninja
🎓Find me on Udemy @ www.udemy.com/user/47fd83f6-5...
👾 Video thumbnail artwork by PixelSwish @ / @designable
finally somebody that knows to explain.
i know right every other tutorial i watched was so confusing
True
YEEEEEES
he's incredible.
Now when I feel like I need a basic knowledge of something, I first browse all the series found on Ninja Channel, better explanation as always; keep the good work
Netninja is so great. Every time I get stuck at some point in a long course elsewhere, I come to this channel to see individual topics explained much more clearly. Thank you :D
Clear, concise and beginner friendly.
Finally someone that knows how to teach to people who are new to code!
It can be so frustrating trying to find digestible lessons on YT!
I kind of grasped this concept before. However, this explanation along with practice helped me to consolidate this idea. I'll be coming to this channel more often. Thanks for the help!
That's great to hear Dwight, thanks for your support!
For one year almost I was struggling with classes avoided using it in the projects but today I can say I got it! Seriously this is the best tutorial I saw on classes. Loved it!
Man i struggled with explanation of constructor function and the "this" keyword and you explained it so well. Earned a sub.
Is this really easy to understand or are you just really good at explaining it? Either way, I don't really care because it makes sense! Great Video.
i think somehow other videos have a way of making this seem 10x harder... and he makes this seem 10x easier 🤩
i always see these kind of comments everywhere and I thought that most people are lying but this really did make it more understandable. in fact, in every oop videos i've watched, this is the only one that i saved on my playlist
Have been struggling with this, getters and setters and you have truly just made it so simple. Thank you!
watched like 10 videos on constructors each more than 10mins long, then I come across this video. thank you.
I really really like your way of explaining things. You take nothing for granted when you explain the concepts, which is really helpful. I've been doing another course,, which I actually like, but you explain things, so I get it immediately! You have a new fan:-)
Omg you deserve a medal on how to explain code in such a way that even a none programmer can understand. Bravo, keep up the good work!
I've struggled to understand the concept in other programming languages but the way you've explained the subject by first showing how to write standalone objects and seconly how to create them dynamically via classes is that missing gap I've had for a long time. Thanks a whole lot! You're incredible!
As a school teacher I AM IMPRESSED! you taught well my friend
Thank you! :)
An amazing teacher who has a superb way of explaining things! so much better than other tutorials! Thank you so much for the material you provide!
Been searching for an explanation for constructors for too long but here you are!! thanks a lot
All I can say is thank you. My friend lent me access to a course worth hundreds of dollars and your videos are way clearer and to the point. Amazing 👏
Wow, thanks for the kind words Weykent :) means a lot!
Easily the best explanation for constructors I've seen so far.
It one of the best description of classes and constructors I've ever heard. You're rock man! Thank you.
Thanks Carl!
I've done exercises similar to this one, but this is the first time I actually understand what and more importantly why we do this. Bravo sir 👏
I have watched so many tutorials and im taking classes on Coursera. Nobody has come close to making this make sense for me the way that you have. By far the BEST explanation ive ever heard Thank You! I will be subscribing.
Wow, thanks for the kind words Kevin :) much appreciated and welcome aboard!
I love how you explained this man, it was so dumbed down and easily understood. I understand constructors better than ever now
That's awesome to know :) thanks for watching
Thanks for making 'classes' much easier for me, I love the way you explain.
thank you very much these tutorials are the best absolutely easy to understand and the example you use to teach are very easy and relevant
Hi, I have to say I have just been accepted into Lambda School for Dec/Jan, having you to watch as my goto study material is just amazing.
The way you explain everything in depth and complete detail is absolutely brilliant for someone like me who is a complete novice to coding/web dev, you give me confidence that I can come to your videos and if I didn't understand the concept before watching, I will after watching.
Thank you @The Net Ninja
Awesome, thank you and congrats! :)
Wow! The 'class' is used in that way. I always write the codes in like "function User(email, name){ this.email = email; this.name = name}". Maybe there are some reasons why they grabbed the 'class' into Javascript. I expect you, the Net Ninja, to explain well as always! I appreciate your teaching all the time!
Classes were never a thing in the past within JS. What you just described is creating a constructor function, that was the old way to create these type of objects, but when it came down to the prototype and inheritance the required code just looked horrible and difficult to read, thus with a newer version of JS classes were introduced to replace the old classic constructor functions. Both do the same thing, the code is just much easier to manage later down the line with classes.
You are really good at explaining for real. I have been struggling with this for almost a week. Thank you so much
Awesome, glad it helped :)
best programming tutorials channel fast and understandable!
Brilliantly explained. Straight to the point.
Absolutely fantastic tutorials, wished I'd come across this years ago when I started off. Anyway, not to be pedantic, but that 'new' key word actually does four things - the first three as you mentioned including the fourth which is returning the object instance it created.
Love this series. Waiting for the next part.
By far the most useful video on the subject I have found. Truly able to explain it so that a beginner like myself can understand and digest the concepts. Thank you.
Glad it was helpful! :)
Thanks a lot for your thorough explanation, at last, could find a video where everything was clear. Once again thanks for your efforts.
Dude. You're 1 million times better at explaining than any other person I've seen on RUclips or Udemy. I swear all other tutorials on anything web dev speak to me as if I'm a robot. I am not a robot, thank you for teaching humans as humans.
Thank you, glad you like :)
same here
you should really watch the stuff from 'Dev Ed' then. Both on youtube and his actual courses. Makes it easy to understand and it's funny at the same time.
Flawless Tutorial. You explained everything so well!
Thank you so much 😀
Glad it was helpful! :)
Thanks, your explanation is so simple and on point. I understand better now.
Cleanest explanation so far, thank you very much!
Thanks :)
Brilliantly explained. Thank you!
my gratitude for this video right here is so *astronomical*
awesome video, keep em coming!, also I hope you also explain managing databases with OOP
Something worth watching Thnx for the Great Lesson ✌️ !
This was extremely helpful. Thank you!
always nice these refreshing video on JS! thanks
Thank you for the explanation! 🙌🏻 Good video
Absolute legend great way of explaining
Awesome job explaining this!
Best explanation available online. Thank you so much!
You're welcome! :) hope it was helpful
This was super helpful! thank you!
Thanks! It’s really helpful! 🙏
Clearly understandable and minimalistic video
Godlike explanation. Thanks a million
Thank you man ! I now understand constructors ! Thumbs up to u !
Wonderful pedagogy! Thank you
I subscribe!
THIS HELPED SO MUCH! thanks
WOW! Putting across very nicely...!
Thank you! Cheers!
Brave! That's why you have 700k subscripts! Keep Growing! Thanks
Simply genius explanation
great description thx sir keep up the great work
Love you bro, you are truly a ninja! Love
AWESOME , you make it simple... this.teacher = 'true teacher' Iol tks a lot for alll knowledge shared!
Thank you! 😃
great explanation...waiting for more...
This was very helpful! Thanks a lot!
Glad it was helpful! :)
Great explanation!
Wow, totally get it now!!!!
very solid explanation thank you
OMG ,,,, this video is the best among 10 oop videos I already saw ,,,,,,, thanks bro
Beautiful explanation! Thank you
You're very welcome! :)
It just saved my life
Thank you this helped alot
Woooooo.... Your explanation was AMAZING... Thank You...💝💝💝💝💝
You're welcome 😊
Appreciate your videos
I love you, ma dude!
Thank you very much!
Helpful thanks 👍
💯🔥godninja
Nice!!!!
You are so amazing. So clear and concise explanations. I have one confusion right now though, I have learned from older updates of JS about constructor functions when creating new objects, so how are classes different from construct functions and when should I use classes and when should I use just plain constructor functions? Thanks man keep it up!
Don't use constructor functions now as classes are there.
Short and sweet
😗
you're my favourite!
Man made it easy
Tnx a lot man. U just saved my ass. Subbed
this is what a ninja means
love it
Back With Visual Studio Code
thank you ver much for the very wel explained lessons. Great jon. A question on the var you use ? i did understand ( unless i am wrong ) that the old var was in more recent versions of JS replaced by the let and const because of ' scope ' reasons an the difference between var and let there . Is there a reason you use var here ? Would this also work with let ?
What are the benefits using the new class syntax over simply using a constructor object on its own?
It makes the code when coming to inheritance between constructors (and other stuff) muuuch easier to read (and remember).
#The_Net_Ninja is the best teacher
good explanation
What are your thoughts on choosing composition over inheritance?
Merci :)
This man explained something actually no, he explained all I need to know. he needs like a 2m sub for the precise, accurate explanations he does. #ThisManIsALegend my teacher couldn't explain this...
nothing more to say alas I am at peace...
what does putting the "var" in front of the new objects do?
the "new" keyword let you create these {objects}. class is just syntactical sugar: try to instantiate a normal "function declaration" by using the "new" keyword and it will return the same value as long as you use "this" in declaring its properties(this.property = 'somevalue'). any normal function RETURNS "this:{prop1: value1, prop2: value2,...}" by DEFAULT as long as we use the "new" key word when instantiating. a CONSTRUCTOR inside a class does the same thing regarding this feature. the difference between a "class" and a "function declaration" is its naming convention as to where normal functions use "camelCase" but in class we use "PascalCase". in the early days the old Javascript engine inside our BROWSERS use functions similar to classes(today). this naming convention was made to avoid CONFUSION bet. a normal function vs a function being instantiated(new) with "this:{}" inside of it. normal functions does not RETURN "this" by default, only when instantiated using "new". Hope it helps.
thanks
Is it proper to say to pass parameters to class we use constructors ?
noticed you were still replying to comments so I just wanna say great tutorial, but also how do you get the notifications for caps lock? it seems pretty cool ngl
Can someone please explain why wouldn't we use functions for this?
How would i get user input by doing this.
carry on bro go on
love you too
please upload the next video as soon as possible